feat(paimon-core): Add test cases for TableScan partition, bucket, level filters and list APIs - #9781
feat(paimon-core): Add test cases for TableScan partition, bucket, level filters and list APIs#9781fightBoxing wants to merge 2 commits into
Conversation
JingsongLi
left a comment
There was a problem hiding this comment.
Reviewed 498db17. Requirement fit: UNSUPPORTED for this broad coverage-only scope. Implementation: FINDINGS in the added tests.
I am closing this version because the added maintenance surface is not justified by additional end-to-end regression protection. Existing tests already cover partition listing (TableScanListPartitionsTest), bucket filtering (SimpleTableTestBase), partition filtering and TopN. The new TopN case checks only splits.size() <= 2 without checking either returned rows or partition membership; returning no data passes it. Several bucket/level/filter assertions likewise accept an empty result, and testScanAfterCompaction does not establish that a compaction occurred.
The exact-head Maven reactor/package run on JDK 11 completed the TableScanTest suite: 20 tests, 2 failures, both in newly added methods. testBucketFilter assumes ten committed rows mean ten splits, but the planner produces three bucket splits. testScanWithMultipleFilters reads a=10 even though its assertion requires a>=50: scan pruning is not an exact row filter, and the TableRead was not configured with the predicate.
Please replace this broad addition with a focused test PR for a specific missing contract or real regression: assert the exact expected rows/files, prove the intended optimization or compaction ran, and show a representative faulty implementation fails the test. That would change the value assessment; simply increasing API coverage or test count does not.
Re-created from closed PR #7214.
Summary
Add comprehensive test cases for
TableScanin paimon-core to improve coverage forInnerTableScaninterface methods.Changes
testPartitionFilter: Test partition filter with Map and BinaryRowtestBucketFilter: TestwithBucketandwithBucketFiltermethodstestLevelFilter: Test level filter for primary key tabletestListPartitionEntries: TestlistPartitionEntriesandlistPartitionsAPIstestPrimaryKeyTableScan: Test scan with update and delete operationstestEmptyTableScan: Test scan behavior on empty tabletestScanWithMultipleFilters: Test combination of partition and column filterstestLimitWithPartitionFilter: Test limit pushdown with partition filtertestScanAfterCompaction: Test scan result after compactiontestTopNWithPartitionFilter: Test TopN with partition filter combinationAPI Coverage
withPartitionFilter,withBucket,withBucketFilter,withLevelFilterlistPartitionEntries,listPartitionsCloses #7214