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/04 07:25:41 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #10403: [FLINK-14645][table] Support to keep nullability and precision when converting DataTypes to properties

JingsongLi commented on a change in pull request #10403: [FLINK-14645][table] Support to keep nullability and precision when converting DataTypes to properties
URL: https://github.com/apache/flink/pull/10403#discussion_r353581983
 
 

 ##########
 File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/LegacyTypeInformationType.java
 ##########
 @@ -65,12 +65,20 @@ public LogicalType copy(boolean isNullable) {
 
 	@Override
 	public String asSerializableString() {
-		throw new TableException("Legacy type information has no serializable string representation.");
+		return withNullability(
+			FORMAT,
+			getTypeRoot(),
+			typeInfo.getTypeClass().getName(),
+			EncodingUtils.encodeObjectToString(typeInfo));
 
 Review comment:
   How about still use `TypeStringUtils`?

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