You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "fsk119 (via GitHub)" <gi...@apache.org> on 2023/02/02 09:34:41 UTC
[GitHub] [flink] fsk119 commented on a diff in pull request #21827: [FLINK-30868][table-api] Fix to use origin LongSerializer for serialiā¦
fsk119 commented on code in PR #21827:
URL: https://github.com/apache/flink/pull/21827#discussion_r1094255682
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/typeutils/TimeIndicatorTypeInfo.java:
##########
@@ -61,10 +62,13 @@ protected TimeIndicatorTypeInfo(boolean isEventTime) {
this.isEventTime = isEventTime;
}
+ // this replaces the effective serializer by a LongSerializer
+ // it is a hacky but efficient solution to keep the object creation overhead low but still
+ // be compatible with the corresponding SqlTimestampTypeInfo
@Override
@SuppressWarnings("unchecked")
public TypeSerializer<Timestamp> createSerializer(ExecutionConfig executionConfig) {
- return (TypeSerializer) LocalDateTimeSerializer.INSTANCE;
+ return (TypeSerializer) LongSerializer.INSTANCE;
Review Comment:
They modify the `TimeIndicatorTypeInfo` is because it will break the test `FunctionITCase#testAggregateFunction`. Now I revert the change in the `TimeIndicatorTypeInfo` and make sure the test still passes. So I think the origin test is enough.
--
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-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org