wuchong commented on a change in pull request #14035: URL: https://github.com/apache/flink/pull/14035#discussion_r521786370
########## File path: flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/typeutils/RowDataSerializerTest.java ########## @@ -205,44 +243,77 @@ private static GenericRowData createRow(Object f0, Object f1, Object f2, Object } private static boolean deepEqualsRowData( - RowData should, RowData is, RowDataSerializer serializer1, RowDataSerializer serializer2) { + RowData should, + RowData is, + RowDataSerializer serializer1, + RowDataSerializer serializer2) { + return deepEqualsRowData(should, is, serializer1, serializer2, false); + } + + private static boolean deepEqualsRowData( + RowData should, + RowData is, + RowDataSerializer serializer1, + RowDataSerializer serializer2, + boolean checkClass) { if (should.getArity() != is.getArity()) { return false; } + if (checkClass && should.getClass() != is.getClass()) { + return false; + } + BinaryRowData row1 = serializer1.toBinaryRow(should); Review comment: It always convert rows to `BinaryRowData` for comparing. Could we additionally compare the `RowData` directly when `checkClass` is true? ---------------------------------------------------------------- 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