Repository navigation
Attach RowFn validity directly to canonical output - #10742
connortsui20 wants to merge 1 commit into
Conversation
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Merging this PR will degrade performance by 4.67%4 warnings, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Summary
Attaches input validity directly when a RowFn kernel already returns canonical output, avoiding an extra lazy mask execution. Reuses the existing canonical-validity helper instead of passing validity through the visitor and collector interfaces.
Changes
Keeps kernel-output validation before masking, then retains output relabeling and outer-nullability handling. Non-canonical output uses the existing lazy mask fallback. This PR is independent of float32 packing and the broader RowFn migration.
Draft pending design review and fresh isolated benchmarks on this head. This revisits the abstraction concern raised in #9694. The measurements support exploring the smaller change, but do not resolve that concern or establish a regression-free result.
Saved benchmark evidence and validation
The isolated validity snapshot
b1961452ea3505d4e2588e34b14c20ea177ed175was compared with frozendevelopata1693389301e446eec41373cb274d98a303d3ca0. Measurements used Rust 1.99.1 / LLVM 23.1.1, 16 CGUs, no LTO, CPU 2, and 21 balanced paired blocks on Graviton3 C7g and Sapphire Rapids C7i. This was native wall time, not CodSpeed simulation.For nullable u64 addition with 64 rows and a right-hand constant, median paired time ratios were:
The isolated snapshot also had flagged regressions outside that case: roughly 3.4% slower ARM u64 multiply and up to 4.2% slower AVX2 byte comparisons. No regressions crossed the 3% flag on AVX-512 in that run. These movements remain part of the review, even where unchanged code is sensitive to compiler context or binary layout.
A separate combined packing/validity candidate at
8d8ef8151454bbc73e1cd0b236567542a1401cbe, based ond834a11faa79370b4d2e0bbcc73195f451a8a212, retained the small-batch gain but regressed nullable u64 add by about 12% at 8,192 rows and 18% at 32,768 rows on AVX2. Profiling found a byte-identical retry hot loop with essentially unchanged instructions per operation and more cycles. The precise placement-sensitive mechanism remains unresolved. That combined result does not isolate this PR.The combined candidate passed 225 RowFn tests and 232 binary-function tests on that newer base, including output validation, allocator, and deferred-error coverage. Separate native probes checked null-row arithmetic errors and comparison edge cases. The changed file passed the pinned formatter. These are saved checks, not fresh validation of this individual PR.
This PR is rebased onto
c750fbd80882f78efd6a2703bc0f3e17f1aca9f9. The patch is unchanged by the rebase. Tests and benchmarks were not rerun after it.