Skip to content

Conversation

@corgy-w
Copy link
Contributor

@corgy-w corgy-w commented Jun 29, 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 updates how catalog tables are created for Debezium JSON formats and adds a unit test to verify the new schema behavior.

  • Refactors getProducedCatalogTables to pass separate schema parameters instead of a single combined name.
  • Introduces DebeziumJsonFormatTest to validate the produced catalog table when using the compatible Debezium JSON format.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/IncrementalSource.java Changed getProducedCatalogTables to supply separate catalog/schema/table arguments when format is compatible with Debezium JSON
connector-cdc-base/src/test/java/org/apache/seatunnel/connectors/cdc/debezium/format/DebeziumJsonFormatTest.java Added test testGetProducedCatalogTablesWithCompatibleDebeziumJson to assert table ID for Debezium JSON format
Comments suppressed due to low confidence (1)

seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/test/java/org/apache/seatunnel/connectors/cdc/debezium/format/DebeziumJsonFormatTest.java:112

  • [nitpick] Consider adding a test case for when the connection format is not 'compatible_debezium_json' to ensure the method returns the original catalogTables list as expected.
        ReadonlyConfig config =

return Collections.singletonList(
CatalogTableUtil.getCatalogTable(
"default.default",
"schema",
Copy link

Copilot AI Jul 2, 2025

Choose a reason for hiding this comment

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

The hard-coded string "schema" appears to be a placeholder rather than an actual catalog name. Replace it with the configured catalog (or database) value to avoid mismatches.

Suggested change
"schema",
readonlyConfig.get(JdbcSourceOptions.CATALOG_NAME, "default_catalog"),

Copilot uses AI. Check for mistakes.
@corgy-w corgy-w merged commit 10cb844 into apache:dev Jul 10, 2025
7 checks passed
chncaesar pushed a commit to chncaesar/seatunnel that referenced this pull request Jul 19, 2025
dybyte pushed a commit to dybyte/seatunnel that referenced this pull request Jul 23, 2025
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