[
https://issues.apache.org/jira/browse/FLINK-39224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
CHANHAE OH updated FLINK-39224:
-------------------------------
Description:
h1. 1. Motivation
Currently, the Flink JDBC Connector for PostgreSQL does not support the
`json`/`jsonb` data types. When users attempt to read a table containing
`json`/`jsonb` columns through the `PostgresCatalog`, it fails with
an`UnsupportedOperationException: Doesn't support Postgres type 'jsonb' yet.
The `json`/`jsonb` types are widely used native data types in PostgreSQL for
storing JSON documents.
was:
h2. 1. The Reason for This Change (Motivation)
Currently, the Flink JDBC Connector for PostgreSQL does not recognize the
json/jsonb data type. When a user attempts to read a table containing a
json/jsonb column through the PostgresCatalog, it fails with an
UnsupportedOperationException: Doesn't support Postgres type 'jsonb' yet.
The json/jsonb type is a widely used data type in PostgreSQL.
h1. 2. The Solution(Changes)
It use a DataType.STRING() in flink.
The postgres return to java String from json or jsonb type. therefore We can
use JSON_QUERY or JSON_VALUE in flink.
h1. 3. Test Case
h3. 1. Dynamic Table
Add a new case json in PostgresDynamicTableSourceITCase.getTestData()
h3. 2. Catalog
Add test json/jsonb case.
> Support PostgreSQL JSON, JSONB type
> -----------------------------------
>
> Key: FLINK-39224
> URL: https://issues.apache.org/jira/browse/FLINK-39224
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / JDBC
> Affects Versions: jdbc-4.0.0
> Reporter: CHANHAE OH
> Priority: Minor
> Fix For: jdbc-4.1.0, jdbc-3.4.0
>
>
> h1. 1. Motivation
> Currently, the Flink JDBC Connector for PostgreSQL does not support the
> `json`/`jsonb` data types. When users attempt to read a table containing
> `json`/`jsonb` columns through the `PostgresCatalog`, it fails with
> an`UnsupportedOperationException: Doesn't support Postgres type 'jsonb' yet.
> The `json`/`jsonb` types are widely used native data types in PostgreSQL for
> storing JSON documents.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)