Skip to content

[Improve] support postgresql regclass type in cdc sync#658

Merged
JNSimba merged 1 commit into
apache:masterfrom
liujiwen-up:codex/postgres-regclass-type
May 19, 2026
Merged

[Improve] support postgresql regclass type in cdc sync#658
JNSimba merged 1 commit into
apache:masterfrom
liujiwen-up:codex/postgres-regclass-type

Conversation

@liujiwen-up
Copy link
Copy Markdown
Contributor

Summary

This PR adds support for PostgreSQL regclass columns in CDC database sync.

Previously, PostgreSQL whole-database sync could fail during schema conversion with:

Unsupported Postgres Type: regclass

@liujiwen-up liujiwen-up changed the title Support PostgreSQL regclass type in CDC sync [Improve] Support PostgreSQL regclass type in CDC sync May 15, 2026
@liujiwen-up liujiwen-up changed the title [Improve] Support PostgreSQL regclass type in CDC sync [Improve] support postgresql regclass type in cdc sync May 16, 2026
@JNSimba JNSimba requested a review from Copilot May 18, 2026 09:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the PostgreSQL-to-Doris type conversion used by the CDC sync tooling to handle PostgreSQL regclass columns, preventing schema-conversion failures during whole-database sync.

Changes:

  • Add regclass handling in PostgresType.toDorisType(...) by mapping it to Doris STRING.
  • Add unit coverage for regclass conversion at the type-mapping layer and in schema-change / DDL parsing paths.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
flink-doris-connector/flink-doris-connector-base/src/main/java/org/apache/doris/flink/tools/cdc/postgres/PostgresType.java Maps PostgreSQL regclass to Doris STRING to avoid unsupported-type failures.
flink-doris-connector/flink-doris-connector-base/src/test/java/org/apache/doris/flink/tools/cdc/postgres/PostgresTypeTest.java Adds focused unit test verifying regclass (case-insensitive) maps to STRING.
flink-doris-connector/flink-doris-connector-base/src/test/java/org/apache/doris/flink/sink/writer/serializer/jsondebezium/TestJsonDebeziumSchemaChangeImplV2.java Adds schema-change type-name test ensuring Debezium column metadata with regclass becomes STRING.
flink-doris-connector/flink-doris-connector-base/src/test/java/org/apache/doris/flink/sink/schema/SQLParserSchemaManagerTest.java Adds DDL parsing test for PostgreSQL ALTER TABLE ... ADD COLUMN ... regclass → Doris STRING.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@JNSimba JNSimba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JNSimba JNSimba merged commit dd4b7ef into apache:master May 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants