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,28 @@
# name: test/sql/json/issues/issue8695.test
# description: Test issue 8695 - INTERNAL Error: Attempted to dereference unique_ptr that is NULL
# group: [issues]
require json
# these two succeeded
statement ok
SELECT MAX(JSON_ARRAY_LENGTH(filter_keystage))::int - 1 FROM read_json_auto('data/json/filter_keystage.ndjson');
statement ok
WITH RECURSIVE nums AS (
SELECT 0 AS n
UNION ALL
SELECT n + 1 FROM nums
WHERE n < 5
)
SELECT * FROM nums;
# but combining them fails
statement ok
WITH RECURSIVE nums AS (
SELECT 0 AS n
UNION ALL
SELECT n + 1 FROM nums
WHERE n < (SELECT MAX(JSON_ARRAY_LENGTH(filter_keystage))::int - 1 FROM read_json_auto('data/json/filter_keystage.ndjson'))
)
SELECT * FROM nums;