[opt](parquet) Fuse fragmented nullable selection planning - #66397
[opt](parquet) Fuse fragmented nullable selection planning#66397Gabriel39 wants to merge 1 commit into
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
There was a problem hiding this comment.
Review summary
Two changes are required before this is ready:
- Add a reader-level regression that actually enters the new fused nullable-selection branch and verifies a subsequent batch/page, rather than testing only the planner helper and eligibility predicate.
- Make the benchmark guide's validation record consistent with the newly registered 292
ParquetKernelcases.
Critical checkpoints:
- Correctness and cursor state: the logical-to-physical selection mapping matched the legacy contract in independent exhaustive checks, including zero-length run parity, nonzero filter offsets, selected/filtered NULL and non-NULL rows, and long-run splitting. No concrete value-shift or row-count defect was found.
- Decoder, error, and lifecycle behavior: the fused and legacy paths enter the same prepared decoder/materialization logic; supported plain, dictionary, boolean, byte-stream-split, and delta paths consume the same physical selection. Conversion-failure remapping, rollback behavior, page continuation, and
_remaining_num_valuesupdates were traced without finding a distinct defect. - Performance and observability: the gate remains limited to large, materially nullable, fragmented flat batches; nested and non-expandable shapes retain the legacy path. The new scratch is included in reserve/release accounting and the existing hybrid batch/range counters remain attributable.
- Tests and documentation: helper-level oracle coverage is broad, but the production wiring is not exercised; the validation-record count is also stale. These are the two inline requests above.
- Compatibility and resource safety: no new format-compatibility, ownership, unbounded-memory, or corruption-path issue was substantiated.
- User focus: no additional user-provided focus was supplied, so the whole PR was reviewed normally.
Review status: complete after two rounds. The final normal production, benchmark/coverage, and separate risk-focused scans all returned NO_NEW_VALUABLE_FINDINGS against this frozen comment set and unchanged head a67a328803bc805059d02d52a5eb7bdc7af69dee.
Review constraint: no repository code-review SKILL.md exists in this checkout, and the review contract prohibited local builds, so this was a static review supplemented by independent planner models and the submitted test/benchmark evidence.
| EXPECT_EQ(filter, nullptr); | ||
| } | ||
|
|
||
| TEST(NativeNullableSelectionTest, BuildsPhysicalRangesAndSelectedNullsInOnePass) { |
There was a problem hiding this comment.
The new tests exercise build_filtered_nullable_selection() and the eligibility predicate directly, but none drives the actual ScalarColumnReader::_read_values() branch into materialize_fused_nullable_values(). That leaves the new wiring unprotected: a regression in nonzero _filter_map_index, page/_remaining_num_values advancement, or nullable expansion could pass all of these tests. Please add a reader-level case with at least 1,024 fragmented nullable rows and a partial filter, assert the values and NULL layout, then read a subsequent batch/page so the production path and cursor continuation are covered.
|
|
||
| be/output/lib/benchmark_test --benchmark_list_tests \ | ||
| | grep -c '^ParquetKernel/' # currently 92 | ||
| | grep -c '^ParquetKernel/' # currently 292 |
There was a problem hiding this comment.
Please update the Current validation record below as part of this count change. It still says 92 kernel, while this command and the matrix description now correctly expect 292 (92 existing plus 200 nullable-selection cases). The guide currently gives reviewers contradictory pass/fail criteria.
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
What
Why the guard is conservative
The full benchmark matrix includes no-NULL, low-NULL, and clustered level plans as negative controls. Those shapes do not remove enough legacy work to guarantee a win, so this change deliberately leaves them unchanged. Decoder selection and encoding-specific materialization are not modified.
Verification
NativeNullableSelectionTest.*and benchmark scenario tests: 16/16 passed.ParquetV2NativeDecoderTest.*: 118/118 passed.Release microbenchmark
The microbenchmark isolates nullable selection planning; it is not presented as an end-to-end query speedup.