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



##########
File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/typeutils/WindowKeySerializer.java
##########
@@ -109,10 +106,9 @@ public void copy(DataInputView source, DataOutputView 
target) throws IOException
     @Override
     public int serializeToPages(WindowKey record, AbstractPagedOutputView 
target)
             throws IOException {
-        int windowSkip = checkSkipWriteForWindowPart(target);
         target.writeLong(record.getWindow());
-        int keySkip = keySerializer.serializeToPages(record.getKey(), target);
-        return windowSkip + keySkip;
+        keySerializer.serializeToPages(record.getKey(), target);
+        return 0;

Review comment:
       Actually, the return value is just for save 
`checkSkipReadForFixLengthPart` in the `mapFromPages`, the cost is very small.

##########
File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/typeutils/WindowKeySerializer.java
##########
@@ -109,10 +106,9 @@ public void copy(DataInputView source, DataOutputView 
target) throws IOException
     @Override
     public int serializeToPages(WindowKey record, AbstractPagedOutputView 
target)
             throws IOException {
-        int windowSkip = checkSkipWriteForWindowPart(target);
         target.writeLong(record.getWindow());
-        int keySkip = keySerializer.serializeToPages(record.getKey(), target);
-        return windowSkip + keySkip;
+        keySerializer.serializeToPages(record.getKey(), target);
+        return 0;

Review comment:
       Actually, the return value is just for saving 
`checkSkipReadForFixLengthPart` in the `mapFromPages`, the cost is very small.




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


Reply via email to