dhruvxvaishnav opened a new pull request, #24285: URL: https://github.com/apache/datafusion/pull/24285
## Which issue does this PR close? - Closes #24267. ## Rationale for this change FixedSizeBinary grouping keys, such as UUIDs, commonly contain no nulls. The vectorized comparison path currently checks null state and performs bounds checks for every candidate row even when both the stored and incoming values are known to be non-null. ## What changes are included in this PR? - Add a non-null comparison fast path that skips per-row null checks. - Keep checked access in debug builds and use bounds-check-free reads in optimized builds. The group and input row indices are produced internally by `GroupValuesColumn` and are valid by construction. - Preserve the existing nullable comparison path. - Add focused coverage for matching values, mismatching values, and rows already rejected by an earlier grouping column. ## Are these changes tested? Yes. The following checks passed: - `cargo fmt --all -- --check` - `cargo clippy --all-targets --all-features -- -D warnings` - `cargo test --release -p datafusion-physical-plan --lib fixed_size_binary` (9 passed) - `RUST_BACKTRACE=1 cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-cli --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption` - `cargo bench -p datafusion-physical-plan --bench multi_group_by --features test_utils -- fixed_size_binary` Two Linux benchmark comparisons against the same unchanged `main` baseline showed: | Case | First run | Repeated run | |---|---:|---:| | Vectorized, 1,000 groups | 11.9% faster | 21.4% faster | | Vectorized, 1,000,000 groups | No statistically significant change | 4.0% faster | The row-based control showed no statistically significant change in the full comparison. ## Are there any user-facing changes? There are no API or behavior changes. Non-null FixedSizeBinary group comparisons are faster. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
