mihaibudiu commented on code in PR #5013:
URL: https://github.com/apache/calcite/pull/5013#discussion_r3399910515


##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -4548,12 +4550,42 @@ SqlCall PercentileFunctionCall() :
 }
 
 
+/**
+ * Parses an EXCLUDE or EXCEPT clause following a star inside a ROW 
constructor,
+ * e.g. {@code ROW(* EXCLUDE(col1, col2))} or {@code ROW(t.* EXCEPT(t.col))}.
+ *
+ * @param starIdentifier the star (e.g. "*" or "t.*") that precedes the 
EXCLUDE clause
+ */
+SqlNode RowStarExclude(SqlIdentifier starIdentifier) :
+{
+    SqlIdentifier id;    // current column identifier being parsed
+    final List<SqlNode> list = new ArrayList<SqlNode>();
+    Span s;
+}
+{
+    (<EXCLUDE> | <EXCEPT>)
+    <LPAREN> { s = span(); }
+    id = CompoundIdentifier() { list.add(id); }
+    (
+        <COMMA> id = CompoundIdentifier() { list.add(id); }
+    )*
+    <RPAREN> {
+        final SqlNodeList excludeList = new SqlNodeList(list, s.end(this));
+        return new SqlStarExclude(
+            SqlParserPos.sum(ImmutableList.of(
+                starIdentifier.getParserPosition(),
+                excludeList.getParserPosition())),
+            starIdentifier, excludeList);
+    }
+}
+
 /**
  * Parses an atomic row expression.
  */
 SqlNode AtomicRowExpression() :
 {
     final SqlNode e;
+    SqlNode rowStar;

Review Comment:
   I have pushed a new commit which removes this flag altogether. 
   I think that this does not really cause any conflicts with dialects that do 
NOT support this flag - SQL with this feature is really a superset of the SQL 
accepted by such dialects.



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