Skip to content

Conversation

@hailin0
Copy link
Member

@hailin0 hailin0 commented May 13, 2025

Purpose of this pull request

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

Copy link
Contributor

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 addresses the missing column type issue for Oracle rename DDL events by updating the resolve method’s signature and adding a completionEvent method to complete the missing column type information.

  • Updated the SchemaChangeResolver interface and AbstractSchemaChangeResolver to accept a list of CatalogTable objects instead of a SeaTunnelDataType.
  • Added logic in completionEvent to complete the column type during a rename event.
  • Updated the related test and Debezium deserialization to integrate the changes.

Reviewed Changes

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

File Description
AbstractSchemaChangeResolverTest.java Added tests to verify that column type information is correctly completed during column rename events.
SeaTunnelRowDebeziumDeserializeSchema.java Modified the resolve call to pass the necessary table information for column type resolution.
SchemaChangeResolver.java Updated the resolve method signature to accept a List of CatalogTable instances.
AbstractSchemaChangeResolver.java Refactored the resolve method and added the completionEvent method for completing column type information.
Comments suppressed due to low confidence (2)

seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/schema/AbstractSchemaChangeResolver.java:137

  • Consider adding a null-check for oldColumn before calling its rename method. This will prevent potential NullPointerExceptions if the expected column is missing in the table schema.
Column oldColumn = table.getTableSchema().getColumn(changeColumnEvent.getOldColumn());

seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/schema/SchemaChangeResolver.java:32

  • The resolve method signature has been updated to accept a List instead of a SeaTunnelDataType. Please ensure that corresponding documentation and downstream usages are updated to reflect this change.
SchemaChangeEvent resolve(SourceRecord record, List<CatalogTable> catalogTables);

@corgy-w corgy-w merged commit 11a23af into apache:dev May 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants