danny0405 commented on a change in pull request #1066: [CALCITE-2843] Babel 
parser should support PostgreSQL casting operator '::'
URL: https://github.com/apache/calcite/pull/1066#discussion_r300819396
 
 

 ##########
 File path: babel/src/main/codegen/includes/parserImpls.ftl
 ##########
 @@ -50,4 +50,28 @@ SqlNode DateFunctionCall() :
 |   < TILDE: "~" >
 }
 
+SqlBinaryOperator SpecialBinaryOperator() :
+{
+}
+{
+    <PG_CAST> { return SqlStdOperatorTable.PG_CAST; }
+}
+
+SqlBinaryOperator PostgreSQLCasting(List<Object> list, ExprContext 
exprContext) :
+{
+    SqlBinaryOperator op;
+}
+{
+    op = SpecialBinaryOperator() {
+        checkNonQueryExpression(exprContext);
+        list.add(new SqlParserUtil.ToTreeListItem(op, getPos()));
+    }
+    { final SqlDataTypeSpec dt; }
 
 Review comment:
   Move `dt` together with `op` declaration.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to