matriv commented on a change in pull request #17919:
URL: https://github.com/apache/flink/pull/17919#discussion_r767495405
##########
File path:
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/CastRuleUtils.java
##########
@@ -75,6 +75,10 @@ static String accessStaticField(Class<?> clazz, String
fieldName) {
return className(clazz) + "." + fieldName;
}
+ static String accessArrayLength(String instanceTerm) {
Review comment:
Personally, I'd prefer: `arrayLength` without the `access`.
##########
File path:
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -639,29 +639,36 @@
.fromCase(DOUBLE(), 0.0d, false)
.fromCase(DOUBLE(), -0.12345678d, true),
CastTestSpecBuilder.testCastTo(BINARY(2))
- .fromCase(CHAR(3), fromString("foo"), new byte[] {102,
111, 111})
+ .fromCase(CHAR(3), fromString("foo"), new byte[] {102,
111, 111}, true)
+ .fromCase(CHAR(3), fromString("foo"), new byte[] {102,
111})
+ .fromCase(CHAR(1), fromString("f"), new byte[] {102})
+ .fromCase(CHAR(3), fromString("f"), new byte[] {102})
+ .fromCase(VARCHAR(5), fromString("Flink"), new byte[]
{70, 108})
Review comment:
nit: Here and below, I would use the last arg with `false` to be more
visible how the test behaves with legacy behaviour enabled and disabled.
--
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]