Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-13285 Check connectors runnable in blink runner
  3. FLINK-13283

JDBC source/sink should respect the conversion class of DataType

    XMLWordPrintableJSON

Details

    Description

      Hi , when I use Flink 1.9  JDBCTableSource,and I create  TableSchema like this:
      final TableSchema schema = TableSchema.builder()
      .field("id", DataTypes.INT())
      .field("create", DataTypes.DATE())
      .field("update", DataTypes.DATE())
      .field("name", DataTypes.STRING())
      .field("age", DataTypes.INT())
      .field("address", DataTypes.STRING())
      .field("birthday",DataTypes.DATE())
      .field("likethings", DataTypes.STRING())
      .build();
      I use JDBCTableSource.builder() to create JDBCTableSource, I run the program, and there is a exception :
      java.lang.IllegalArgumentException: Unsupported type: LocalDate
      I saw the src code , I find that in LegacyTypeInfoDataTypeConverter , DateType convert to Types.LOCAL_DATE,but in JDBCTypeUtil class, the HashMap TYPE_MAPPING doesn't have the key Types.LOCAL_DATE,so that throw the exception.
      Does the JDBC dim table support the time data,Like Date? May it is bug for JDBCTableSource join.

      Attachments

        Issue Links

          Activity

            People

              TsReaper Caizhi Weng
              shenlang LakeShen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: