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


##########
babel/src/main/codegen/includes/parserImpls.ftl:
##########
@@ -197,17 +197,31 @@ SqlCreate SqlCreateTable(Span s, boolean replace) :
 void InfixCast(List<Object> list, ExprContext exprContext, Span s) :
 {
     final SqlDataTypeSpec dt;
+    SqlNode e, p;
 }
 {
     <INFIX_CAST> {
         checkNonQueryExpression(exprContext);
     }
     dt = DataType() {
-        list.add(
-            new SqlParserUtil.ToTreeListItem(SqlLibraryOperators.INFIX_CAST,
-                s.pos()));
-        list.add(dt);
+        SqlNode leftOperand = (SqlNode) list.remove(list.size() - 1);

Review Comment:
   But doesn't this rule now parse a cast followed by a field access or an ITEM?



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