On Wed, Mar 18, 2026 at 10:47 PM Henson Choi <[email protected]> wrote:
>
> 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.

fixed.

>
> 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.

I created a similar case using the social graph, applying a pattern
*a followed b before a's 18th birthday*, which should work.

>
> Otherwise, LGTM.
>
> Regards,
> Henson
>

-- 
Regards
Junwang Zhao

Attachment: v2-0001-GRAPH_TABLE-collect-variables-across-full-clause.patch
Description: Binary data

Reply via email to