lincoln-lil commented on code in PR #21827:
URL: https://github.com/apache/flink/pull/21827#discussion_r1094145881


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/TableSchemaUtils.java:
##########
@@ -98,6 +100,21 @@ public static int[] getPrimaryKeyIndices(TableSchema 
schema) {
         }
     }
 
+    /** Removes time attributes from the {@link ResolvedSchema} and build a 
{@link TableSchema}. */
+    public static TableSchema 
removeTimeAttributeFromResolvedSchema(ResolvedSchema resolvedSchema) {

Review Comment:
   we'd better add a test for it



##########
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:
   Any tests releated to this change?



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