li3zhi4 commented on PR #11746:
URL: https://github.com/apache/seatunnel/pull/11746#issuecomment-5629115344

   @DanielLeens Both items addressed on head `a6a8eb7c2`:\n\n**Issue 1 (Oracle 
version gate) \u2014 implemented as your Option A.** 
`JdbcDialect.supportCompositeKeySplit()` now takes the live connection's 
`DatabaseMetaData` (chosen over `Connection` so the gate stays a cheap, 
non-throwing decision \u2014 same plumbing style as 
`validateStringRangeSplit`). `ChunkSplitter` resolves it via the existing 
cached provider connection (`getOrEstablishConnection()` \u2192 
`connection.getMetaData()`) \u2014 no second connection, nothing closed by the 
check. `OracleDialect` returns `true` only when `getDatabaseMajorVersion() >= 
12`; below that it logs `Oracle major version {} < 12, falling back to 
single-column split; set partition_column to force a single split key` and 
returns `false`, so a pre-12c job falls back to the exact single-column path it 
uses on `dev` today. If acquiring the connection or metadata throws, we WARN 
and return `false` (safe fallback, nothing propagates out of `findSplit
 Key`). MySQL/PostgreSQL/SQLite/SQL Server take the new parameter and are 
behaviorally unchanged.\n\nNew unit tests cover the gate matrix with a mocked 
`DatabaseMetaData`: Oracle 11 \u2192 false, 12 \u2192 true, 23 \u2192 true; the 
other four dialects true at versions 1 and 99; metadata `SQLException` \u2192 
fallback; connection-acquisition failure \u2192 fallback. 
(`CompositeKeyChunkSplitterTest` now 17/17.)\n\nDocs updated in both languages: 
the Oracle 12c+ sentence now describes enforced runtime fallback instead of a 
stated precondition.\n\n**Issue 2 (collation caveat) \u2014 documented** in 
`docs/en` + `docs/zh` `Jdbc.md` composite-key section: tuple ordering uses Java 
`String.compareTo` (code-point) semantics, which may disagree with 
case-/accent-insensitive DB collations such as `utf8mb4_general_ci`; STRING 
components whose collation diverges are unsupported, with the 
numeric-leading-key / `partition_column` mitigations noted.\n\nValidation on 
`a6a8eb7c2`: `JdbcOracleSplitIT` 3
 /3 on Oracle 23ai (gate keeps composite active), `JdbcMysqlSplitIT` 7/7, 
`JdbcSqliteSplitIT` 3/3, spotless clean. As you suggested, the pre-12c fallback 
path itself is covered by the mocked-metadata unit tests rather than an E2E (we 
have no 11g container in the suite).\n


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