Anthrino commented on code in PR #3677:
URL: https://github.com/apache/calcite/pull/3677#discussion_r1496704666


##########
core/src/main/java/org/apache/calcite/sql2rel/StandardConvertletTable.java:
##########
@@ -684,7 +686,13 @@ protected RexNode convertCast(
     final boolean safe = kind == SqlKind.SAFE_CAST;
     final SqlNode left = call.operand(0);
     final SqlNode right = call.operand(1);
+    final SqlNode format = call.getOperandList().size() > 2 ?
+        call.operand(2) : null;
+
     final RexBuilder rexBuilder = cx.getRexBuilder();
+    final RexNode arg = cx.convertExpression(left);
+    final RexNode formatArg = isNull(format) ? null : 
cx.convertExpression(format);

Review Comment:
   Thanks for checking this Julian, I intended to use a Null-valued RexLiteral 
in cases where the format clause is not specified with the CAST expression. 
I've updated the flow to populate/check the constant null literal where 
required.



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