Copilot commented on code in PR #2402:
URL: https://github.com/apache/age/pull/2402#discussion_r3133008378


##########
src/backend/parser/cypher_expr.c:
##########
@@ -1326,21 +1326,14 @@ static Node 
*transform_column_ref_for_indirection(cypher_parsestate *cpstate,
     }
 
     /* find the properties column of the NSI and return a var for it */
-    node = scanNSItemForColumn(pstate, pnsi, levels_up, "properties", 
+    node = scanNSItemForColumn(pstate, pnsi, levels_up, "properties",
                                cr->location);
 
     /*
-     * Error out if we couldn't find it.
-     *
-     * TODO: Should we error out or return NULL for further processing?
-     *       For now, just error out.
+     * If there's no "properties" column, continue transforming the
+     * ColumnRef as an agtype value and try to apply the indirection via

Review Comment:
   The new block comment implies this function itself will “continue 
transforming the ColumnRef as an agtype value”, but the function only returns 
the result of scanNSItemForColumn (possibly NULL). Consider rewording to 
explicitly state that returning NULL is intentional so the caller 
(transform_A_Indirection) will fall back to transforming the ColumnRef and 
applying indirection via agtype_access_operator.
   ```suggestion
        * If there's no "properties" column, return NULL intentionally so
        * transform_A_Indirection() can fall back to transforming the
        * ColumnRef as an agtype value and apply the indirection via
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to