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

Edge cases in create property graph #22

Closed Dtenwolde closed 4 months ago

Dtenwolde commented 1 year ago

Should the following query be accepted?

CREATE PROPERTY GRAPH pg
VERTEX TABLES (
    Student PROPERTIES ( * ) LABEL Person,
    School as school_alias  PROPERTIES ( * ) LABEL School IN School_kind (Hogeschool, University)
    )
EDGE TABLES (
    know    SOURCE KEY ( src ) REFERENCES Student ( id )
            DESTINATION KEY ( dst ) REFERENCES Student ( id )
            PROPERTIES ( createDate ) LABEL Knows
    )
Dtenwolde commented 1 year ago

No, this should not be allowed Oracle 23c produces the following error: ORA-00936: missing expression

DuckPGQ produces the following error:

Parser Error: syntax error at or near "*"
LINE 3:     Student PROPERTIES ( * ) LABEL Person,
Dtenwolde commented 4 months ago
-CREATE PROPERTY GRAPH snb
    VERTEX TABLES (
        Person PROPERTIES (*)
        )
    EDGE TABLES (
        Person_knows_person     SOURCE KEY (Person1Id) REFERENCES Person (id)
                                DESTINATION KEY (Person2Id) REFERENCES Person (id)
                                LABEL Knows);

Run Time (s): real 0.011 user 0.001736 sys 0.003017

Parser Error: syntax error at or near "*"
LINE 3:     Person PROPERTIES (*)

Seems we throw an error, following oracle and making this expected behaviour