zhangshenghang commented on PR #11399: URL: https://github.com/apache/seatunnel/pull/11399#issuecomment-5862574743
Thanks @SEZ9 for the detailed re-review — the blocking finding was spot on. Changes in d62998c505: - **Dropped `database.include.list`** from `PostgresSourceConfigFactory` entirely (with a comment explaining the catalog-less-`TableId` trap, mirroring the `Db2SourceConfigFactory` note), so `getTableFilters()` no longer carries a catalog predicate. `PostgresSourceConfigFactoryTest` now asserts the property stays unset. - **Database scoping moved to an explicit predicate**: `TableDiscoveryUtils.listTables(jdbc, tableFilters, databaseFilter)` now takes a `Predicate<String>`, and `PostgresDialect.discoverDataCollections` passes `new HashSet<>(postgresSourceConfig.getDatabaseList())::contains`. `dataCollectionFilter()` keeps ignoring the catalog, so PG-compatible databases whose `TABLE_CATALOG` differs from `datname` (the HighGo case) are unaffected — `shouldDeduplicateRepeatedCatalogRows` / `shouldKeepFirstOccurrenceWhenDuplicatesInterleave` pass again against the real filter. - Tests: replaced the mocked `RelationalTableFilters` with the real filter built from `PostgresSourceConfigFactory` and added `shouldKeepAcceptingCatalogLessTableIds` asserting `dataCollectionFilter().isIncluded(new TableId(null, "public", "orders"))` stays `true` (this assertion fails with `database.include.list` set). The gating test uses try-with-resources, asserts on queried database names instead of the exact SQL text, and follows the class style (static imports, `public void`). - `listTables` got a Javadoc describing the two-stage filtering contract, and the excluded-database log line is now `DEBUG`. Verified locally: `spotless:apply` + full `connector-cdc-postgres` unit suite (28 tests) green on the new head, which also includes a fresh `upstream/dev` merge. PostgresCDCIT coverage will run in CI on this head. -- 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]
