This is an automated email from the ASF dual-hosted git repository.

twalthr pushed a commit to branch release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git

commit ae0dba54746e7bedf72ed71c36c8a9f48b593744
Author: Timo Walther <twal...@apache.org>
AuthorDate: Thu Aug 1 16:44:57 2019 +0200

    [FLINK-13463][table-common] Relax legacy type info conversion for VARCHAR 
literals
    
    This closes #9334.
---
 .../flink/table/types/utils/LegacyTypeInfoDataTypeConverter.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/utils/LegacyTypeInfoDataTypeConverter.java
 
b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/utils/LegacyTypeInfoDataTypeConverter.java
index 2990a67..20b6db8 100644
--- 
a/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/utils/LegacyTypeInfoDataTypeConverter.java
+++ 
b/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/utils/LegacyTypeInfoDataTypeConverter.java
@@ -197,7 +197,7 @@ public final class LegacyTypeInfoDataTypeConverter {
                        return foundTypeInfo;
                }
 
-               // we are relaxing the constraint for DECIMAL, CHAR, 
TIMESTAMP_WITHOUT_TIME_ZONE to
+               // we are relaxing the constraint for DECIMAL, CHAR, VARCHAR, 
TIMESTAMP_WITHOUT_TIME_ZONE to
                // support value literals in legacy planner
                LogicalType logicalType = dataType.getLogicalType();
                if (hasRoot(logicalType, LogicalTypeRoot.DECIMAL)) {
@@ -208,6 +208,10 @@ public final class LegacyTypeInfoDataTypeConverter {
                        return Types.STRING;
                }
 
+               else if (hasRoot(logicalType, LogicalTypeRoot.VARCHAR)) {
+                       return Types.STRING;
+               }
+
                else if (canConvertToTimestampTypeInfoLenient(dataType)) {
                        return Types.SQL_TIMESTAMP;
                }

Reply via email to