gyfora commented on code in PR #23490: URL: https://github.com/apache/flink/pull/23490#discussion_r1384969989
########## flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializer.java: ########## @@ -473,25 +521,40 @@ public T deserialize(T reuse, DataInputView source) throws IOException { } } - if ((flags & NO_SUBCLASS) != 0) { + if (isRecord()) { try { + JavaRecordBuilderFactory<T>.JavaRecordBuilder builder = recordHelper.newBuilder(); for (int i = 0; i < numFields; i++) { boolean isNull = source.readBoolean(); if (fields[i] != null) { if (isNull) { - fields[i].set(reuse, null); + builder.setField(i, null); } else { - Object field; + builder.setField(i, deserializeField(null, i, source)); Review Comment: let me just revert this change, reuse may or may not be null. If you pass a non-null reuse it's not null, but otherwise createInstance returns null for records -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org