Re: SQL Property Graph Queries (SQL/PGQ) - Mailing list pgsql-hackers

From Henson Choi
Subject Re: SQL Property Graph Queries (SQL/PGQ)
Date
Msg-id CAAAe_zDo50MZyTsY9FqHXk+RVThssbP8VnJX-i8nYrEKWcfR2A@mail.gmail.com
Whole thread
In response to Re: SQL Property Graph Queries (SQL/PGQ)  (Junwang Zhao <zhjwpku@gmail.com>)
Responses Re: SQL Property Graph Queries (SQL/PGQ)
List pgsql-hackers
Hi Junwang,

>> Yeah, I noticed that too, I will compose a patch for further review.
>
>
> Great, looking forward to reviewing it.

Here.

Thanks for the patch. The code changes look correct and match the
standard's scoping semantics (SR 18).

I applied the patch and ran the regression tests — all clean.

A couple of minor items:

1. pgindent alignment

The variable declaration on this line doesn't follow PostgreSQL's
tab-aligned style:

    String *v = makeString(pstrdup(gep->variable));

Should be:

    String     *v = makeString(pstrdup(gep->variable));

Running pgindent on the file should fix this automatically.

2. Additional test coverage for edge patterns

The current tests cover vertex-to-vertex cross-references well.
How about adding a case where an edge WHERE clause references
vertex variables? For example:

    -- edge WHERE cross-referencing vertex and edge properties
    SELECT *
    FROM GRAPH_TABLE (mygraph
        MATCH (a)-[e WHERE e.weight > a.score]->(b)
        COLUMNS (a.name AS a_name, e.weight AS e_wt,
                 b.name AS b_name)
    ) ORDER BY 1, 2;

This would ensure the fix covers edge element patterns too, not
just vertex patterns.

Otherwise, LGTM.

Regards,
Henson
 

pgsql-hackers by date:

Previous
From: "Daniel Verite"
Date:
Subject: Re: Emitting JSON to file using COPY TO
Next
From: Bertrand Drouvot
Date:
Subject: Re: Adding locks statistics