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

Reply via email to