cwida / duckpgq-extension

DuckDB extension that adds support for SQL/PGQ
https://duckpgq.notion.site/b8ac652667964f958bfada1c3e53f1bb?v=3b47a8d44bdf4e0c8b503bf23f1b76f2
MIT License
86 stars 7 forks source link

EXPLAIN ANALYZE COPY leads to segmentation fault #78

Closed Dtenwolde closed 9 months ago

Dtenwolde commented 9 months ago

The following query leads to a segmentation fault:

require duckpgq

statement ok
import database 'duckdb-pgq/data/SNB0.003';

statement ok
-CREATE PROPERTY GRAPH snb
VERTEX TABLES (
    Person LABEL Person,
    Forum LABEL Forum,
    Organisation LABEL Organisation IN typemask(company, university),
    Place LABEL Place,
    Tag LABEL Tag,
    TagClass LABEL TagClass,
    Country LABEL Country,
    City LABEL City,
    Message LABEL Message
    )
EDGE TABLES (
    Person_knows_person     SOURCE KEY (Person1Id) REFERENCES Person (id)
                            DESTINATION KEY (Person2Id) REFERENCES Person (id)
                            LABEL Knows,
    Forum_hasMember_Person  SOURCE KEY (ForumId) REFERENCES Forum (id)
                            DESTINATION KEY (PersonId) REFERENCES Person (id)
                            LABEL hasMember,
    Forum_hasTag_Tag        SOURCE KEY (ForumId) REFERENCES Forum (id)
                            DESTINATION KEY (TagId) REFERENCES Tag (id)
                            LABEL Forum_hasTag,
    Person_hasInterest_Tag  SOURCE KEY (PersonId) REFERENCES Person (id)
                            DESTINATION KEY (TagId) REFERENCES Tag (id)
                            LABEL hasInterest,
    person_workAt_Organisation SOURCE KEY (PersonId) REFERENCES Person (id)
                               DESTINATION KEY (OrganisationId) REFERENCES Organisation (id)
                               LABEL workAt_Organisation,
    Person_likes_Message    SOURCE KEY (PersonId) REFERENCES Person (id)
                            DESTINATION KEY (id) REFERENCES Message (id)
                            LABEL likes_Message,
    Message_hasTag_Tag      SOURCE KEY (id) REFERENCES Message (id)
                            DESTINATION KEY (TagId) REFERENCES Tag (id)
                            LABEL message_hasTag,
    Message_hasAuthor_Person    SOURCE KEY (messageId) REFERENCES Message (id)
                                DESTINATION KEY (PersonId) REFERENCES Person (id)
                                LABEL hasAuthor,
    Message_replyOf_Message SOURCE KEY (messageId) REFERENCES Message (id)
                            DESTINATION KEY (ParentMessageId) REFERENCES Message (id)
                            LABEL replyOf
    );

statement ok
EXPLAIN ANALYZE COPY (FROM GRAPH_TABLE (snb_projected
MATCH p = ANY SHORTEST (a:Person WHERE a.id = 19791209309999)-[k:knows]-> *(b:Person where b.id = 30786325579519)
COLUMNS (path_length(p), a.id as a_id, b.id as b_id)
) tmp LIMIT 20) TO 'output/ic13-ea.txt';