You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Danny Chan (JIRA)" <ji...@apache.org> on 2019/08/07 03:18:00 UTC

[jira] [Created] (FLINK-13604) All kinds of problem when conversion from Logical type to DataType

Danny Chan created FLINK-13604:
----------------------------------

             Summary: All kinds of problem when conversion from Logical type to DataType
                 Key: FLINK-13604
                 URL: https://issues.apache.org/jira/browse/FLINK-13604
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / API
    Affects Versions: 1.9.0
            Reporter: Danny Chan
             Fix For: 1.10.0


For Blink Planner:
# Time(3) is converted to Time, the precision is lost
# ROW<`f0` INT NOT NULL, `f1` BOOLEAN> is converted to ROW<`f0` INT, `f1` BOOLEAN>, the nullable attr is lost

the conversion code is:

{code:java}
LogicalTypeDataTypeConverter.fromLogicalTypeToDataType(FlinkTypeFactory.toLogicalType(relType));
{code}

For Flink planner:
# All the Char type is converted to String type, which is totally wrong.
# All the decimal type is converted to Legacy(BigDecimal) which is confusing ..

The conversion code is:

{code:java}
TypeConversions.fromLegacyInfoToDataType(FlinkTypeFactory.toTypeInfo(relType))
{code}

Please see the tests SqlToOperationConverterTest#testCreateTableWithFullDataTypes.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)