wuchong commented on a change in pull request #15236:
URL: https://github.com/apache/flink/pull/15236#discussion_r595262116
##########
File path:
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/typeutils/InternalTypeInfo.java
##########
@@ -120,6 +120,10 @@ public RowDataSerializer toRowSerializer() {
return (RowDataSerializer) typeSerializer;
}
+ public AbstractRowDataSerializer<RowData> toAbstractRowSerializer() {
Review comment:
I think `TypeSerializer<T> toSerializer()` is enough.
##########
File path:
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/aggregate/window/combines/CombineRecordsFunction.java
##########
@@ -59,8 +57,11 @@
/** Whether to copy key and input record, because key and record are
reused. */
private final boolean requiresCopy;
+ /** Serializer to copy key if required. */
+ private AbstractRowDataSerializer<RowData> keySerializer;
Review comment:
Can be final. And I think `TypeSerializer<RowData>` is enough. The same
to others.
##########
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:
IIRC, there were tests failed if we do not skip bytes, e.g. the
remaining space is not enough for window key.
----------------------------------------------------------------
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]