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

   @DanielLeens Fixed on head `d945b0c19`, exactly along the improvement you 
prescribed:\n\n- **`buildCompositeCondition`**: the `isLastSplit` and 
middle-split branches now both append `AND <col> IS NOT NULL ...` via the 
existing `buildNotNullKeyCondition` helper, mirroring the boundary-detection 
queries. The first split keeps its `IS NULL` disjunct (captures NULL-component 
rows exactly once) and the single-full-table path is untouched. The method 
Javadoc now describes the explicit guard \u2014 the old \"excludes 
NULL-component rows\" claim was, as you showed, only true for leading-column 
NULLs.\n- **Unit test** renamed to 
`testMiddleAndLastSplitsExcludeNullKeyComponents` and strengthened: it asserts 
middle/last split SQL contain the per-column `IS NOT NULL` guard and no bare 
`IS NULL`, and that the first split contains the `IS NULL` disjunct with no `IS 
NOT NULL` \u2014 so the original substring-only assertion can no longer pass 
against the buggy shape.\n- **E2E fixture redesigned**
 : base rows now have distinct ascending `order_id`, and the 3 NULL-`line_no` 
rows sit at `order_id` 46/47/48 \u2014 strictly inside a middle split's 
leading-column range (boundaries land at 9, 18, 27, ..., 45, 54, ...). We 
verified **empirically** that this fixture catches the defect: with the 
middle-branch guard temporarily removed, the test fails with `expected: <93> 
but was: <96>` (all 3 NULL rows read twice via the leading-column-only branch); 
with the fix restored, it passes.\n\nValidation on `d945b0c19`: 
`JdbcSqliteSplitIT` 3/3 (including the redesigned NULL test), 
`JdbcMysqlSplitIT` 7/7, `JdbcOracleSplitIT` 3/3, 
`CompositeKeyChunkSplitterTest` 13/13, spotless clean.\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