dwsmith1983 opened a new issue, #26806:
URL: https://github.com/apache/datafusion/issues/26806

   ### Is your feature request related to a problem or challenge?
   
   `array_map_key_range` 
(`datafusion/physical-plan/src/joins/hash_join/exec.rs`) takes the build 
batches and, under `NullEqualsNull`, evaluates the join key expressions again 
to check for nulls. It also sums `num_rows` over the batches.
   
   After #26793, `build_in_memory` concatenates first and has already evaluated 
the keys into `left_values` before it calls `array_map_key_range`, which now 
always gets that one concatenated batch. For a computed key that is an array 
map candidate under `NullEqualsNull`, the keys are evaluated twice, and the 
second copy covers the whole build side rather than one input batch at a time.
   
   ### Describe the solution you'd like
   
   Pass `&left_values[0]` (for the null count) and `num_rows` to 
`array_map_key_range` instead of `&[RecordBatch]`. This drops the duplicate 
evaluation and the row count loop, and makes the function's inputs match what 
it actually uses.
   
   ### Describe alternatives you've considered
   
   Leave it as is. It only matters for computed integer keys under 
`NullEqualsNull`, and the extra evaluation is transient.
   
   ### Additional context
   
   Came up in review of #26793 (follows #26792).
   
   ### Willingness to contribute
   
   I cannot contribute to this feature at this time
   


-- 
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]

Reply via email to