Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duckdb gives an internal error when trying to select from multiple GRAPH_TABLE's #201

Closed
2 tasks done
jcavano opened this issue May 22, 2024 · 3 comments
Closed
2 tasks done

Comments

@jcavano
Copy link

jcavano commented May 22, 2024

What happens?

When attempting to run a query that selects from multiple property graph tables, the following error is given: "Error: INTERNAL Error: Attempted to dereference unique_ptr that is NULL!"

According to the property graph sql standard described in ISO/IEC 9075-16, selecting from multiple GRAPH_TABLE's (implicit cross join) should be possible.

To Reproduce

CREATE TABLE cities (
name VARCHAR,
lat DECIMAL,
lon DECIMAL
);

CREATE TABLE cities_are_adjacent (
city1name VARCHAR,
city2name VARCHAR
);

-CREATE PROPERTY GRAPH citymap
VERTEX TABLES (
cities PROPERTIES (name,lat,lon) LABEL city
)
EDGE TABLES (
cities_are_adjacent SOURCE KEY ( city1name ) REFERENCES cities ( name )
DESTINATION KEY ( city2name ) REFERENCES cities ( name )
LABEL adjacent
);

D -select * from GRAPH_TABLE (citymap MATCH (s:city)-[r:adjacent]->(t:city)) g1;

┌─────────┬───────────────┬───────────────┬───┬───────────────┬───────────────┐
│ name │ lat │ lon │ … │ lat_1 │ lon_1 │
│ varchar │ decimal(18,3) │ decimal(18,3) │ │ decimal(18,3) │ decimal(18,3) │
├─────────────────────────────────────────────────────────────────────────────┤
│ 0 rows │
└─────────────────────────────────────────────────────────────────────────────┘
D -select * from GRAPH_TABLE (citymap MATCH (s:city)-[r:adjacent]->(t:city)) g1, GRAPH_TABLE (citymap MATCH (s:city)-[r:adjacent]->(t:city)) g2;
Error: INTERNAL Error: Attempted to dereference unique_ptr that is NULL!

OS:

Linux x86_64

DuckDB Version:

v0.10.1-dev17 bb9b820

DuckDB Client:

c++

Full Name:

Jeff Cavano

Affiliation:

eBay

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have
@Dtenwolde
Copy link
Collaborator

Hi there, apologies for the slow reply, I didn't get notifications for this repository. I replied yesterday to your issue in the duckdb repo, but I'll also paste it for anybody else.

Currently, multiple graph_table's are not yet supported. They are on my short-term to-do list though. I have an issue open for it cwida/duckpgq-extension#88 to track the progress :)

@jcavano
Copy link
Author

jcavano commented May 29, 2024

Got it, thanks for the update.

@Dtenwolde
Copy link
Collaborator

Fixed in cwida/duckpgq-extension#122 and should now be available when doing force install 'duckpgq' in DuckDB v1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants