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


##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -3791,13 +3809,61 @@ void AddExpression2b(List<Object> list, ExprContext 
exprContext) :
     e = Expression3(exprContext) {
         list.add(e);
     }
+    AddRegularPostfixes(list)
+    [
+        LOOKAHEAD(2, <COLON> SimpleIdentifier(),
+            { this.conformance.isColonFieldAccessAllowed() })
+        <COLON>
+        ext = SimpleIdentifier() {
+            list.add(
+                new SqlParserUtil.ToTreeListItem(
+                    SqlStdOperatorTable.DOT, getPos()));
+            list.add(ext);
+        }
+        AddRegularPostfixes(list)
+    |
+        LOOKAHEAD(2, <COLON> <LBRACKET>,
+            { this.conformance.isColonFieldAccessAllowed() })
+        <COLON>
+        AddBracketAccess(list)
+        AddRegularPostfixes(list)
+    ]
+}
+
+void AddBracketAccess(List<Object> list) :

Review Comment:
   please add a comment describing what this is expected to parse; I know this 
code has been moved, but since the context of the caller is missing, the 
comment will help maintainers.



##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -3791,13 +3809,61 @@ void AddExpression2b(List<Object> list, ExprContext 
exprContext) :
     e = Expression3(exprContext) {
         list.add(e);
     }
+    AddRegularPostfixes(list)
+    [
+        LOOKAHEAD(2, <COLON> SimpleIdentifier(),
+            { this.conformance.isColonFieldAccessAllowed() })
+        <COLON>

Review Comment:
   Does this cover the Databricks and Snowflake capabilities?



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