pyscala commented on a change in pull request #13834:
URL: https://github.com/apache/flink/pull/13834#discussion_r514983810
##########
File path:
flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvRowDataSerDeSchemaTest.java
##########
@@ -109,6 +109,54 @@ public void testSerializeDeserialize() throws Exception {
new byte[] {107, 3, 11});
}
+ @Test
+ public void testSerializeDeserializeForTime() throws Exception {
+ testFieldForTime(
+ TIME(3),
+ "12:12:12.232",
+ "12:12:12.232",
+ (deserSchema) -> deserSchema.setNullLiteral("null"),
+ (serSchema) -> serSchema.setNullLiteral("null"),
Review comment:
@wuchong
the following code
`Row actualRow = (Row)
DataFormatConverters.getConverterForDataType(dataType).toExternal(deserializedRow);
`
in methed
`testField(
DataType fieldType,
String csvValue,
Object value,
Consumer<CsvRowDataDeserializationSchema.Builder>
deserializationConfig,
String fieldDelimiter)`
will change TIME(n) (0<=n<=3) to TIME(0) .Then the test will fail.
I still use `testFieldForTime()`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]