stoty commented on code in PR #2222:
URL: https://github.com/apache/phoenix/pull/2222#discussion_r2246868926
##########
phoenix-core-client/src/main/antlr3/PhoenixSQL.g:
##########
@@ -864,9 +864,10 @@ finally{ contextStack.pop(); }
// Parse a full upsert expression structure.
upsert_node returns [UpsertStatement ret]
+@init{List<List<ParseNode>> v = new ArrayList<List<ParseNode>>(); }
: UPSERT (hint=hintClause)? INTO t=from_table_name
(LPAREN p=upsert_column_refs RPAREN)?
- ((VALUES LPAREN v=one_or_more_expressions RPAREN ( ON DUPLICATE KEY (
ig=IGNORE |
+ ((VALUES LPAREN e = one_or_more_expressions {v.add(e);} RPAREN (COMMA
LPAREN e = one_or_more_expressions {v.add(e);} RPAREN )* ( ON DUPLICATE KEY (
ig=IGNORE |
Review Comment:
nit:
Would extracting `LPAREN e = one_or_more_expressions {v.add(e);} RPAREN`
imto a function make sense ?
--
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]