should be it
This commit is contained in:
26
external/duckdb/test/sql/json/issues/issue16684.test
vendored
Normal file
26
external/duckdb/test/sql/json/issues/issue16684.test
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# name: test/sql/json/issues/issue16684.test
|
||||
# description: Test issue 16684 - When using read_json to read data, it always converts the md5 string to uuid format.
|
||||
# group: [issues]
|
||||
|
||||
require json
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
copy (select '00000000000000000000000000000000' md5) to '__TEST_DIR__/issue16684.json'
|
||||
|
||||
# should be varchar, not uuid (no hyphens)
|
||||
query II
|
||||
select md5, typeof(md5) from '__TEST_DIR__/issue16684.json'
|
||||
----
|
||||
00000000000000000000000000000000 VARCHAR
|
||||
|
||||
statement ok
|
||||
copy (select '00000000-0000-0000-0000-000000000000' id) to '__TEST_DIR__/issue16684.json'
|
||||
|
||||
# if we add hyphens we get a uuid
|
||||
query II
|
||||
select id, typeof(id) from '__TEST_DIR__/issue16684.json'
|
||||
----
|
||||
00000000-0000-0000-0000-000000000000 UUID
|
||||
Reference in New Issue
Block a user