should be it

This commit is contained in:
2025-10-24 19:21:19 -05:00
parent a4b23fc57c
commit f09560c7b1
14047 changed files with 3161551 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
# name: test/sql/json/issues/issue10784.test
# description: Test issue 10784 - read_json_auto has some unexpected behavior
# group: [issues]
require json
# original query from the issue should just return an error because it's not an array of objects
statement error
SELECT * FROM read_json_auto('data/json/arr.json', columns={'v':'VARCHAR','k':'VARCHAR'});
----
Invalid Input Error
# if we ignore errors we get NULLs because the array entries aren't objects
query II
SELECT * FROM read_json_auto('data/json/arr.json', columns={'v':'VARCHAR','k':'VARCHAR'}, ignore_errors=true);
----
NULL NULL
NULL NULL
# if we read it as if it's one column we just get the array values as varchar
query I
SELECT * FROM read_json_auto('data/json/arr.json', columns={'v':'VARCHAR'});
----
4
hello