You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/02 02:53:01 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #10268: [Flink-14599][table-planner-blink] Support precision of TimestampType in blink planner

JingsongLi commented on a change in pull request #10268: [Flink-14599][table-planner-blink] Support precision of TimestampType in blink planner
URL: https://github.com/apache/flink/pull/10268#discussion_r352402532
 
 

 ##########
 File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/types/TypeInfoDataTypeConverter.java
 ##########
 @@ -98,6 +105,20 @@ private static void addDefaultTypeInfo(Class<?> clazz, TypeInformation<?> typeIn
 		}
 		LogicalType logicalType = fromDataTypeToLogicalType(dataType);
 		switch (logicalType.getTypeRoot()) {
+			case TIMESTAMP_WITHOUT_TIME_ZONE:
+				TimestampType timestampType = (TimestampType) logicalType;
+				int precision = timestampType.getPrecision();
+				if (timestampType.getKind() == TimestampKind.REGULAR) {
+					return clazz == SqlTimestamp.class ?
+						new SqlTimestampTypeInfo(precision) :
 
 Review comment:
   Add `serialVersionUID` to `SqlTimestampTypeInfo`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services