haruki-830 opened a new pull request, #4540: URL: https://github.com/apache/flink-cdc/pull/4540
## What is the purpose of this pull request? This PR introduces an opt-in best-effort schema expansion capability for existing sink tables during the initial `CreateTableEvent`. When the target table already exists and its schema is narrower than the incoming schema, some sinks may ignore input columns that do not exist in the target table, potentially causing silent data loss. When enabled, the framework attempts conservative schema expansion, including adding missing nullable non-key columns and safely widening non-key column types. Unsupported, unsafe, or failed operations are delegated to the sink's existing handling without introducing new framework-level fail-fast behavior. ## Brief change log - Add the sink option `existing-table.schema-expansion.enabled`, disabled by default. - Add an optional `MetadataApplier` extension for querying and normalizing the existing target schema. - Perform best-effort schema expansion during initial table creation. - Log derived DDL events and verify the target schema after successful operations. - Integrate the extension with both Paimon and Fluss sinks. - Add related tests and documentation. --- ## Documentation - Does this pull request introduce a new feature? yes - If yes, how is the feature documented? docs and JavaDocs --- ## JIRA issue [https://issues.apache.org/jira/browse/FLINK-40647](https://issues.apache.org/jira/browse/FLINK-40647) -- 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]
