matriv commented on a change in pull request #18098:
URL: https://github.com/apache/flink/pull/18098#discussion_r768658556
##########
File path:
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/RowDataToStringConverterImpl.java
##########
@@ -46,7 +46,7 @@ public RowDataToStringConverterImpl(DataType dataType) {
dataType,
DateTimeUtils.UTC_ZONE.toZoneId(),
Thread.currentThread().getContextClassLoader(),
- true);
+ false);
Review comment:
+1
##########
File path:
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -547,7 +549,12 @@
.fromCase(
ARRAY(INT().nullable()),
new GenericArrayData(new Integer[] {null,
456}),
- fromString("[null, 456]"))
+ fromString("[NULL, 456]"))
Review comment:
same here
##########
File path:
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -563,11 +570,16 @@
.fromCase(
MAP(STRING().nullable(),
INTERVAL(MONTH()).nullable()),
mapData(entry(null, -123),
entry(fromString("b"), null)),
- fromString("{null=-10-03, b=null}"))
+ fromString("{NULL=-10-03, b=NULL}"))
+ .fromCase(
+ MAP(STRING().nullable(),
INTERVAL(MONTH()).nullable()),
+ mapData(entry(null, null)),
+ fromString("{NULL=NULL}"))
Review comment:
nit: Maybe adding the `false` as last argument makes it more visible,
since otherwise the test cases are the same. This is done in other cases
already, so it would be nice to have consistency.
Instead though, we could make the `fromCase` with the boolean arg private ,
and introduce a `fromCaseLegacy` to be even more visible. WDYT?
##########
File path:
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/casting/CastRulesTest.java
##########
@@ -484,8 +484,10 @@
.fromCase(VARCHAR(5), fromString("Flink"),
fromString("Flink"))
.fromCase(VARCHAR(10), fromString("Flink"),
fromString("Flink"))
.fromCase(STRING(), fromString("Apache Flink"),
fromString("Apache Flink"))
- .fromCase(BOOLEAN(), true, fromString("true"))
- .fromCase(BOOLEAN(), false, fromString("false"))
+ .fromCase(BOOLEAN(), true, fromString("TRUE"))
Review comment:
same here
--
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]