jrgemignani commented on code in PR #469:
URL: https://github.com/apache/age/pull/469#discussion_r1091303539
##########
src/backend/parser/cypher_clause.c:
##########
@@ -276,7 +276,7 @@ transform_cypher_merge_mark_tuple_position(List
*target_list,
#define transform_prev_cypher_clause(cpstate, prev_clause, add_rte_to_query) \
transform_cypher_clause_as_subquery(cpstate, transform_cypher_clause, \
prev_clause, NULL, add_rte_to_query)
-static RangeTblEntry *transform_cypher_clause_as_subquery(cypher_parsestate
*cpstate,
+static ParseNamespaceItem
*transform_cypher_clause_as_subquery(cypher_parsestate *cpstate,
transform_method
transform,
Review Comment:
needs proper indentation.
##########
src/backend/parser/cypher_clause.c:
##########
@@ -455,8 +456,10 @@ static Query *transform_cypher_union(cypher_parsestate
*cpstate,
ListCell *left_tlist, *lct, *lcm, *lcc;
List *targetvars, *targetnames, *sv_namespace;
int sv_rtable_length;
- RangeTblEntry *jrte;
int tllen;
+ ParseNamespaceItem *nsitem;
+ ParseNamespaceColumn *sortnscolumns;
+ int sortcolindex;
Review Comment:
Please check formatting.
##########
src/backend/parser/cypher_clause.c:
##########
@@ -302,26 +302,27 @@ static List *add_target_to_group_list(cypher_parsestate
*cpstate,
List *targetlist, int location);
static void advance_transform_entities_to_next_clause(List *entities);
-static ParseNamespaceItem *create_namespace_item(RangeTblEntry *rte, bool
p_rel_visible,
- bool p_cols_visible, bool
p_lateral_only,
- bool p_lateral_ok);
+static ParseNamespaceItem *get_namespace_item(ParseState *pstate,
+ RangeTblEntry *rte);
static List *make_target_list_from_join(ParseState *pstate,
RangeTblEntry *rte);
static Expr *add_volatile_wrapper(Expr *node);
static FuncExpr *make_clause_func_expr(char *function_name,
Node *clause_information);
/* for VLE support */
-static RangeTblEntry *transform_RangeFunction(cypher_parsestate *cpstate,
+static ParseNamespaceItem *transform_RangeFunction(cypher_parsestate *cpstate,
RangeFunction *r);
static Node *transform_VLE_Function(cypher_parsestate *cpstate, Node *n,
RangeTblEntry **top_rte, int *top_rti,
List **namespace);
-static RangeTblEntry *append_VLE_Func_to_FromClause(cypher_parsestate *cpstate,
+static ParseNamespaceItem *append_VLE_Func_to_FromClause(cypher_parsestate
*cpstate,
Node *n);
static void setNamespaceLateralState(List *namespace, bool lateral_only,
bool lateral_ok);
static bool isa_special_VLE_case(cypher_path *path);
+ParseNamespaceItem *find_pnsi(cypher_parsestate *cpstate, char *varname);
+
Review Comment:
If this is static, it needs to state it. If this is external facing, it
needs to be in a header file.
##########
src/backend/parser/cypher_clause.c:
##########
@@ -547,7 +553,14 @@ static Query *transform_cypher_union(cypher_parsestate
*cpstate,
qry->targetList = lappend(qry->targetList, tle);
targetvars = lappend(targetvars, var);
targetnames = lappend(targetnames, makeString(colName));
- left_tlist = lnext(left_tlist);
+ sortnscolumns[sortcolindex].p_varno = leftmostRTI;
+ sortnscolumns[sortcolindex].p_varattno = lefttle->resno;
Review Comment:
incorrect indentation.
##########
src/backend/parser/cypher_clause.c:
##########
@@ -455,8 +456,10 @@ static Query *transform_cypher_union(cypher_parsestate
*cpstate,
ListCell *left_tlist, *lct, *lcm, *lcc;
List *targetvars, *targetnames, *sv_namespace;
int sv_rtable_length;
- RangeTblEntry *jrte;
int tllen;
+ ParseNamespaceItem *nsitem;
+ ParseNamespaceColumn *sortnscolumns;
Review Comment:
incorrect indentation.
##########
src/backend/parser/cypher_clause.c:
##########
@@ -302,26 +302,27 @@ static List *add_target_to_group_list(cypher_parsestate
*cpstate,
List *targetlist, int location);
static void advance_transform_entities_to_next_clause(List *entities);
-static ParseNamespaceItem *create_namespace_item(RangeTblEntry *rte, bool
p_rel_visible,
- bool p_cols_visible, bool
p_lateral_only,
- bool p_lateral_ok);
+static ParseNamespaceItem *get_namespace_item(ParseState *pstate,
+ RangeTblEntry *rte);
Review Comment:
needs proper indentation.
--
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]