Skip to content

Commit

Permalink
Add an additional way to find a previous variable ref (#1450) (#1480)
Browse files Browse the repository at this point in the history
Added an additional way to find a previous variable reference to
`transform_column_ref_for_indirection`.

There was no impact on current regression tests.

Resolved -
Conflicts:
	src/backend/parser/cypher_expr.c
  • Loading branch information
jrgemignani authored Jan 3, 2024
1 parent 2541273 commit 39e696a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/backend/parser/cypher_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,10 +841,16 @@ static Node *transform_column_ref_for_indirection(cypher_parsestate *cpstate,
/* locate the referenced RTE */
rte = find_rte(cpstate, relname);

/* if we didn't find anything, return NULL */
/*
* If we didn't find anything, try looking for a previous variable
* reference. Otherwise, return NULL (colNameToVar will return NULL
* if nothing is found).
*/
if (!rte)
{
return NULL;
Node *prev_var = colNameToVar(pstate, relname, false, cr->location);

return prev_var;
}

/* find the properties column of the NSI and return a var for it */
Expand Down

0 comments on commit 39e696a

Please sign in to comment.