[FLINK-38514][postgres] Add support for UUID array type in PostgreSQL CDC connector#4255
Open
Hisoka-X wants to merge 3 commits intoapache:masterfrom
Open
[FLINK-38514][postgres] Add support for UUID array type in PostgreSQL CDC connector#4255Hisoka-X wants to merge 3 commits intoapache:masterfrom
Hisoka-X wants to merge 3 commits intoapache:masterfrom
Conversation
43bbaa9 to
46ea72b
Compare
There was a problem hiding this comment.
Pull request overview
This pull request adds support for PostgreSQL UUID[] (UUID array) type mapping to Flink's ARRAY type in the CDC connectors. The changes enable proper capture and deserialization of UUID array columns from PostgreSQL databases in both snapshot and incremental (WAL) replication modes.
Changes:
- Added UUID[] to STRING array type mapping in both source and pipeline PostgreSQL CDC connectors
- Implemented array deserialization converter for PostgreSQL with support for nested element conversion
- Added comprehensive test coverage for UUID arrays in both connector types
- Updated documentation to reflect UUID type support (scalar type only)
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| flink-connector-postgres-cdc/src/test/resources/ddl/column_type_test.sql | Added array_types table with uuid_a1 column for testing UUID[] type |
| PostgreSQLConnectorITCase.java | Added testArrayTypes test method to verify UUID array handling in snapshot and WAL modes |
| PostgreSQLDeserializationConverterFactory.java | Implemented createArrayConverter method to handle array deserialization with recursive element conversion |
| flink-connector-postgres-cdc/.../PostgresTypeUtils.java | Added PG_UUID_ARRAY constant and case mapping to ARRAY |
| RowDataDebeziumDeserializeSchema.java | Changed createConverter method visibility from private to public to support array element conversion |
| flink-cdc-pipeline-connector-postgres/src/test/resources/ddl/column_type_test.sql | Updated array_types table to include uuid_a1 column |
| PostgresFullTypesITCase.java | Added assertions to verify UUID array values in testArrayTypes method |
| flink-cdc-pipeline-connector-postgres/.../PostgresTypeUtils.java | Added PgOid.UUID_ARRAY case mapping to ARRAY |
| docs/content/docs/connectors/flink-sources/postgres-cdc.md | Added UUID to the list of PostgreSQL types that map to Flink STRING type |
| docs/content.zh/docs/connectors/flink-sources/postgres-cdc.md | Added UUID to the list of PostgreSQL types that map to Flink STRING type (Chinese version) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../src/test/java/org/apache/flink/cdc/connectors/postgres/table/PostgreSQLConnectorITCase.java
Show resolved
Hide resolved
.../src/test/java/org/apache/flink/cdc/connectors/postgres/table/PostgreSQLConnectorITCase.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This close https://issues.apache.org/jira/browse/FLINK-38514
This pull request adds support for mapping PostgreSQL
UUID[]array types to Flink'sARRAY<STRING>type in both the source and pipeline connectors. It updates type mapping logic, tests, and documentation to ensure thatUUID[]columns are correctly handled and tested throughout the codebase.