slinkydeveloper commented on a change in pull request #17919:
URL: https://github.com/apache/flink/pull/17919#discussion_r762790121



##########
File path: 
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/CastFunctionITCase.java
##########
@@ -282,17 +282,15 @@ protected Configuration configuration() {
                         .build(),
                 CastTestSpecBuilder.testCastTo(BINARY(2))
                         .fromCase(BINARY(5), null, null)
-                        .fromCase(CHAR(3), "foo", new byte[] {102, 111, 111})
-                        .fromCase(VARCHAR(5), "Flink", new byte[] {70, 108, 
105, 110, 107})
-                        // https://issues.apache.org/jira/browse/FLINK-24419 - 
not trimmed to 2
-                        // bytes
-                        .fromCase(STRING(), "Apache", new byte[] {65, 112, 97, 
99, 104, 101})
+                        .fromCase(CHAR(3), "foo", new byte[] {102, 111})
+                        .fromCase(VARCHAR(5), "Flink", new byte[] {70, 108})

Review comment:
       So, in case of this `CastFunctionITCase`, if we have padding it's 
totally fine, as calcite performs optimizations out of our control.
   
   But i'm pretty sure that test case should work as described by me in 
`CastRulesTest`, without padding




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