You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/08 14:18:21 UTC

[GitHub] [flink] matriv commented on a diff in pull request #19409: [FLINK-24577][table-planner] Implement Cast from BINARY to RAW

matriv commented on code in PR #19409:
URL: https://github.com/apache/flink/pull/19409#discussion_r846159965


##########
flink-table/flink-table-planner/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -2024,7 +2029,9 @@ private RexNode simplifySearch(RexCall call, RexUnknownAs unknownAs) {
     private RexNode simplifyCast(RexCall e) {
         RexNode operand = e.getOperands().get(0);
         operand = simplify(operand, UNKNOWN);
-        if (sameTypeOrNarrowsNullability(e.getType(), operand.getType())) {
+        if (sameTypeOrNarrowsNullability(e.getType(), operand.getType())
+                || e.getType() instanceof RawRelDataType) {
+            // || e.getType().getSqlTypeName() == SqlTypeName.OTHER) {

Review Comment:
   Maybe we need this instead?



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org