libenchao commented on a change in pull request #11180: [FLINK-16220][json] Fix JsonRowSerializationSchema cast exception due… URL: https://github.com/apache/flink/pull/11180#discussion_r393652961
########## File path: flink-formats/flink-json/src/test/java/org/apache/flink/formats/json/JsonRowSerializationSchemaTest.java ########## @@ -113,6 +114,12 @@ public void testNestedSchema() { assertThat(row, whenSerializedWith(serializationSchema) .andDeserializedWith(deserializationSchema) .equalsTo(row)); + + row.setField(3, new int[]{1, 2, 3}); + + assertThat(row, whenSerializedWith(serializationSchema) Review comment: Current test can reproduce the problem, because `serializationSchema` is used twice, for the first time, `f4` is `null`, and for the second time, `f4` is not `null`. However the test maybe not straight forward and a little fragile which depends on the first use of `serializationSchema`. I'll add a separate test for this like your example. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services