You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a recursive CTE to query the files which looks like this:
CREATE OR REPLACEVIEWsegmentsAS WITH RECURSIVE
raw_segments AS (
SELECT*FROM read_json(
'/tmp/duckdb-reprofOPqUc/*.json',
columns = {
id: 'INTEGER',
next: 'INTEGER'
})
),
sorted_segments AS (
SELECT0AS seq,
raw_segments.*,
FROM raw_segments
WHEREraw_segments.next IS NULLUNION ALL
(
SELECTsorted_segments.seq+1AS seq,
raw_segments.*,
FROM raw_segments
INNER JOIN sorted_segments ON (raw_segments.next=sorted_segments.id)
)
)
SELECT*FROM sorted_segments
ORDER BY seq;
Running the same query from the DuckDB CLI works correctly on 0.7.1, while using 0.7.1 from Node does not (still need to try comparing with exact versions though).
It also works from Node.JS if I make next always an integer and never null. If I first insert the JSON into a table, then query that it prevents the issue as well.
To Reproduce
I've attached a file with a Node.JS script that reproduces the issue. There's also a SQL script and a folder of test data for comparison.
What happens?
I ran into the following error while querying a few JSON files with the
json
extension from Node:The JSON I am querying is essentially a linked list that looks like this:
I am using a recursive CTE to query the files which looks like this:
Running the same query from the DuckDB CLI works correctly on 0.7.1, while using 0.7.1 from Node does not (still need to try comparing with exact versions though).
It also works from Node.JS if I make
next
always an integer and never null. If I first insert the JSON into a table, then query that it prevents the issue as well.To Reproduce
I've attached a file with a Node.JS script that reproduces the issue. There's also a SQL script and a folder of test data for comparison.
duckdb-issue.zip
OS:
Arch Linux x86_64
DuckDB Version:
0.7.2-dev2233 / c81600e
DuckDB Client:
Node
Full Name:
Matt Allan
Affiliation:
Destructure LLC (consulting)
Have you tried this on the latest
master
branch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
The text was updated successfully, but these errors were encountered: