JingsongLi commented on a change in pull request #16699:
URL: https://github.com/apache/flink/pull/16699#discussion_r684875870



##########
File path: 
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/typeutils/LinkedListSerializer.java
##########
@@ -110,17 +124,40 @@ public int getLength() {
     @Override
     public void serialize(LinkedList<T> list, DataOutputView target) throws 
IOException {
         target.writeInt(list.size());
+        if (hasNullMask) {
+            MaskUtils.writeMask(getNullMask(list), target);
+        }
         for (T element : list) {
-            elementSerializer.serialize(element, target);
+            if (element != null) {
+                elementSerializer.serialize(element, target);
+            }
         }
     }
 
+    private boolean[] getNullMask(LinkedList<T> list) {
+        boolean[] mask = new boolean[list.size()];

Review comment:
       I think we should reuse this mask.




-- 
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


Reply via email to