libenchao commented on code in PR #3419:
URL: https://github.com/apache/calcite/pull/3419#discussion_r1327919801
##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -1437,6 +1437,8 @@ public static SqlNode toSql(RexLiteral literal) {
return SqlLiteral.createTimestamp(typeName,
castNonNull(literal.getValueAs(TimestampString.class)),
literal.getType().getPrecision(), POS);
+ case BINARY:
+ return
SqlLiteral.createBinaryString(requireNonNull(literal.getValueAs(byte[].class)),
POS);
Review Comment:
> I'm wondering if `select cast(null as binary)` would work for current
implementation. It's true that all other types does not consider `null`, they
may suffer from the same problem.
@mihaibudiu What's your thought on this comment?
--
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]