Phoenix500526 opened a new pull request, #27285: URL: https://github.com/apache/datafusion/pull/27285
## Which issue does this PR close? Closes #26806. ## Rationale for this change After #26793, computed integer build keys can be evaluated twice over the concatenated build batch under `NullEqualsNull`: once for the join and again just to check for nulls when selecting an `ArrayMap`. ## What changes are included in this PR? Pass the already evaluated key array and row count to `array_map_key_range`. Reuse the caller's `is_phj_candidate` check before accessing the first key, and remove the duplicate expression evaluation, row-count loop, and unused parameters. ## What is the testing strategy for this PR? The existing 619 hash join execution tests pass against main plus this patch. These cover NULL handling, non-integer and multiple keys, empty inputs, and map selection; no new tests are added because join behavior is unchanged. A local example using a computed physical join key was also checked under LLDB: after entering `build_in_memory`, `BinaryExpr::evaluate` is now called once instead of twice. The example's NULL and non-NULL cases retain their results and map selection. ## Are there any user-facing changes? No SQL result or public API changes. Avoids redundant build-key evaluation for eligible null-safe hash joins. -- 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]
