DanielLeens commented on PR #12970:
URL: https://github.com/apache/seatunnel/pull/12970#issuecomment-6538153720

   Synced with `dev` and addressed the remaining blocker from [the latest 
review](https://github.com/apache/seatunnel/pull/12970#pullrequestreview-5646776812).
 New head: `74a90d2ae7fd1ee8f90378b24b03528e012796cc`.
   
   **Merge with `dev` (`3ac2d1cec6a`)**
   
   - One conflict: 
`connector-cdc-db2/src/test/.../source/Db2IncrementalSourceFactoryTest.java`, 
import blocks only. #12931 added 
`ConfigValidator`/`OptionRule`/`OptionValidationException`/`Stream` imports for 
the URL validation tests; this PR added `ConnectorCommonOptions`. Kept both 
sets; both test groups are present unchanged.
   - `Db2IncrementalSourceFactory.java` and both `DB2-CDC.md` files 
auto-merged: the `notBlank(URL)` rule from #12931 and this PR's option 
normalization coexist. No file from `dev` was reverted (`git diff --name-status 
origin/dev` has no deletions).
   
   **Issue 1 (blocker): backward-compatible table-name lookup instead of a 
documented break**
   
   - `TableDiscoveryUtils.resolveConfiguredTableName(String, 
Predicate<TablePath>)` 
(`connector-cdc-db2/.../utils/TableDiscoveryUtils.java:140`): the folded 
uppercase spelling is used when an object with that name exists; when only an 
object with the configured spelling exists (a table created with quoted 
lowercase identifiers that 3.0.0 matched unquoted), the configured spelling is 
kept; when neither exists the folded name is returned and the existing lookups 
fail fast as before. Quoted names and names unchanged by folding never query 
the catalog.
   - `Db2IncrementalSourceFactory.resolveDb2Options` 
(`.../source/Db2IncrementalSourceFactory.java:156`) opens the `DB2` catalog 
through the same `FactoryUtil.createOptionalCatalog` path `CatalogTableUtil` 
uses and resolves each distinct name once with `Catalog::tableExists`. The 
catalog is opened only when folding would change at least one configured name, 
so uppercase and quoted configurations keep the previous single-connection 
startup. `normalizeDb2Options` now takes the existence predicate; `table-names` 
and `table-names-config.table` share one resolver so the SeaTunnel table 
identity, the Debezium include list and the catalog lookup stay in the same 
spelling.
   - `TableDiscoveryUtils.validateExplicitCaptureTables` 
(`TableDiscoveryUtils.java:81`) accepts the folded id first and the configured 
id as a fallback; `toConfiguredDb2TableId` no longer folds on its own.
   - Tests for the lowercase-created object: 
`TableDiscoveryUtilsTest.shouldKeepCapturingLowercaseCreatedObjectConfiguredUnquoted`
 (resolver precedence: only-lowercase keeps the configured spelling, both-exist 
and none-exist fold, quoted names do not consult the predicate; capture 
validation accepts `("", "db2inst1", "customers")` for 
`e2e.db2inst1.customers`) and 
`Db2IncrementalSourceFactoryTest.shouldKeepConfiguredSpellingWhenOnlyLowercaseCreatedObjectExists`
 (`table-names` and `table-names-config.table` keep `e2e.db2inst1.customers` 
while `e2e.db2inst1.orders` still folds to `ORDERS`). On the previous head both 
fail because the names are folded unconditionally and validation rejects the 
lowercase capture id.
   - Docs: the folding paragraph in `docs/en/connectors/source/DB2-CDC.md` and 
`docs/zh/connectors/source/DB2-CDC.md` now describes the precedence and the 
quoting escape hatch. No `incompatible-changes.md` entry, since 3.0.0 
configurations keep working.
   
   **Issue 3 (non-blocking):** the PR description now has an explicit "Behavior 
change" paragraph for `enable_concurrent_read = false` taking effect (single 
full-table snapshot split, savepoint restores of generated splits unaffected, 
set `true` to keep the old snapshot behavior). Issue 2 (one quote disables 
folding for the whole name) is unchanged; the docs sentence still says a quoted 
component keeps the whole name as configured.
   
   Local validation was limited to `./mvnw spotless:apply` / `spotless:check` 
on `connector-cdc-db2` and `git diff --check`; compile, unit tests and the DB2 
E2E are left to the fork CI run on this head per the validation policy: 
https://github.com/DanielLeens/seatunnel/actions/runs/41162579586
   


-- 
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]

Reply via email to