Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-13604

All kinds of problem when conversion from Logical type to DataType

    XMLWordPrintableJSON

Details

    Description

      For Blink Planner:

      1. Time(3) is converted to Time, the precision is lost
      2. ROW<`f0` INT NOT NULL, `f1` BOOLEAN> is converted to ROW<`f0` INT, `f1` BOOLEAN>, the nullable attr is lost

      the conversion code is:

      LogicalTypeDataTypeConverter.fromLogicalTypeToDataType(FlinkTypeFactory.toLogicalType(relType));
      

      For Flink planner:

      1. All the Char type is converted to String type, which is totally wrong.
      2. All the decimal type is converted to Legacy(BigDecimal) which is confusing ..

      The conversion code is:

      TypeConversions.fromLegacyInfoToDataType(FlinkTypeFactory.toTypeInfo(relType))
      

      Please see the tests SqlToOperationConverterTest#testCreateTableWithFullDataTypes.

      Attachments

        Activity

          People

            Unassigned Unassigned
            danny0405 Danny Chen
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: