[ https://issues.apache.org/jira/browse/FLINK-22199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flink Jira Bot updated FLINK-22199: ----------------------------------- Labels: auto-deprioritized-major stale-minor (was: auto-deprioritized-major) I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issues has been marked as Minor but is unassigned and neither itself nor its Sub-Tasks have been updated for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is still Minor, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized. > The JDBC connector does not support TIMESTAMP(6) WITH LOCAL TIME ZONE NOT > NULL. > ------------------------------------------------------------------------------- > > Key: FLINK-22199 > URL: https://issues.apache.org/jira/browse/FLINK-22199 > Project: Flink > Issue Type: Bug > Components: Connectors / JDBC > Affects Versions: 1.12.2 > Reporter: Tomoyuki NAKAMURA > Priority: Minor > Labels: auto-deprioritized-major, stale-minor > > I have created a PostgreSQL database with the following table definitions. > {code:java} > CREATE TABLE IF NOT EXISTS test ( > id bigint NOT NULL, > name varchar(255) NOT NULL, > created_at timestamp with time zone NOT NULL, > updated_at timestamp with time zone NOT NULL, > PRIMARY KEY(id) > ); > {code} > When I tried to create a PostgresCatalog in Flink 1.12.2, an error occurred. > {code:java} > CREATE CATALOG pg WITH ( > 'type'='jdbc', > 'base-url'='jdbc:postgresql://localhost:5432/', > 'default-database' = 'test', > 'username' = 'postgres', > 'password' = 'postgres' > ){code} > {code:java} > 2021-04-11 17:21:57,685 INFO || Catalog pg established connection to > jdbc:postgresql://localhost:5432/test > [org.apache.flink.connector.jdbc.catalog.AbstractJdbcCatalog] > Exception in thread "main" java.lang.UnsupportedOperationException: > Unsupported type:TIMESTAMP(6) WITH LOCAL TIME ZONE NOT NULL > at > org.apache.flink.connector.jdbc.internal.converter.AbstractJdbcRowConverter.createInternalConverter(AbstractJdbcRowConverter.java:183) > at > org.apache.flink.connector.jdbc.internal.converter.PostgresRowConverter.createPrimitiveConverter(PostgresRowConverter.java:119) > at > org.apache.flink.connector.jdbc.internal.converter.PostgresRowConverter.createInternalConverter(PostgresRowConverter.java:60) > at > org.apache.flink.connector.jdbc.internal.converter.AbstractJdbcRowConverter.createNullableInternalConverter(AbstractJdbcRowConverter.java:118) > at > org.apache.flink.connector.jdbc.internal.converter.AbstractJdbcRowConverter.<init>(AbstractJdbcRowConverter.java:68) > at > org.apache.flink.connector.jdbc.internal.converter.PostgresRowConverter.<init>(PostgresRowConverter.java:49) > at > org.apache.flink.connector.jdbc.dialect.PostgresDialect.getRowConverter(PostgresDialect.java:53) > at > org.apache.flink.connector.jdbc.table.JdbcDynamicTableSource.getScanRuntimeProvider(JdbcDynamicTableSource.java:117) > at > org.apache.flink.table.planner.sources.DynamicSourceUtils.validateScanSource(DynamicSourceUtils.java:254) > at > org.apache.flink.table.planner.sources.DynamicSourceUtils.prepareDynamicSource(DynamicSourceUtils.java:71) > at > org.apache.flink.table.planner.plan.schema.CatalogSourceTable.toRel(CatalogSourceTable.java:101) > at > org.apache.calcite.sql2rel.SqlToRelConverter.toRel(SqlToRelConverter.java:3585) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:2507) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2144) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2050) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertTemporalTable(SqlToRelConverter.java:2583) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2158) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2093) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2050) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertJoin(SqlToRelConverter.java:2866) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2162) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2050) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:663) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:644) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3438) > at > org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:570) > at > org.apache.flink.table.planner.calcite.FlinkPlannerImpl.org$apache$flink$table$planner$calcite$FlinkPlannerImpl$$rel(FlinkPlannerImpl.scala:165) > at > org.apache.flink.table.planner.calcite.FlinkPlannerImpl.rel(FlinkPlannerImpl.scala:157) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.toQueryOperation(SqlToOperationConverter.java:902) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.convertSqlQuery(SqlToOperationConverter.java:871) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.convert(SqlToOperationConverter.java:250) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.convertSqlInsert(SqlToOperationConverter.java:564) > at > org.apache.flink.table.planner.operations.SqlToOperationConverter.convert(SqlToOperationConverter.java:248) > at > org.apache.flink.table.planner.delegation.ParserImpl.parse(ParserImpl.java:77) > at > org.apache.flink.table.api.internal.StatementSetImpl.addInsertSql(StatementSetImpl.java:50){code} > > -- This message was sent by Atlassian Jira (v8.20.1#820001)