You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jingsong Lee (JIRA)" <ji...@apache.org> on 2019/07/24 06:23:00 UTC
[jira] [Updated] (FLINK-13283) Connectors not support
DataTypes.DATE
[ https://issues.apache.org/jira/browse/FLINK-13283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jingsong Lee updated FLINK-13283:
---------------------------------
Summary: Connectors not support DataTypes.DATE (was: JDBCLookup Exception: Unsupported type: LocalDate)
> Connectors not support DataTypes.DATE
> -------------------------------------
>
> Key: FLINK-13283
> URL: https://issues.apache.org/jira/browse/FLINK-13283
> Project: Flink
> Issue Type: Sub-task
> Components: Connectors / JDBC
> Affects Versions: 1.9.0
> Reporter: LakeShen
> Priority: Major
> Fix For: 1.9.0
>
>
> 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 :
> {color:red}java.lang.IllegalArgumentException: Unsupported type: LocalDate{color}
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)