och5351 opened a new pull request, #189: URL: https://github.com/apache/flink-connector-jdbc/pull/189
## 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.
## Changes
This PR adds support for PostgreSQL `json`/`jsonb` types by mapping them
to Flink's `DataTypes.STRING()`.
Since PostgreSQL's JDBC driver returns `json`/`jsonb` values as Java
`String`, users can leverage Flink's JSON functions (e.g., `JSON_QUERY`,
`JSON_VALUE`) to process these columns.
## Test Cases
1. **Dynamic Table Source**
- Added a new test case for `json` type in
`PostgresDynamicTableSourceITCase.getTestData()`
2. **Catalog**
- Added test cases for `json`/`jsonb` type mapping in the PostgreSQL
catalog
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
