metesynnada commented on code in PR #7366:
URL: https://github.com/apache/arrow-datafusion/pull/7366#discussion_r1301711600
##########
datafusion/core/src/physical_plan/joins/hash_join.rs:
##########
@@ -781,22 +780,33 @@ pub fn build_equal_condition_join_indices(
// (5,1)
//
// With this approach, the lexicographic order on both the probe side and
the build side is preserved.
+ let hash_map = build_hashmap.get_map();
+ let next_chain = build_hashmap.get_list();
for (row, hash_value) in hash_values.iter().enumerate().rev() {
// Get the hash and find it in the build index
// For every item on the build and probe we check if it matches
// This possibly contains rows with hash collisions,
// So we have to check here whether rows are equal or not
- if let Some((_, index)) = build_hashmap
- .map
- .get(*hash_value, |(hash, _)| *hash_value == *hash)
+ if let Some((_, index)) =
+ hash_map.get(*hash_value, |(hash, _)| *hash_value == *hash)
{
let mut i = *index - 1;
loop {
- build_indices.append(i);
+ let build_row_value = if let Some(offset) = deleted_offset {
Review Comment:
```
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query ┃ apache_main ┃ upstream_prunable-hash-join ┃ Change ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1 │ 549.90ms │ 549.66ms │ no change │
│ QQuery 2 │ 71.70ms │ 72.52ms │ no change │
│ QQuery 3 │ 172.56ms │ 170.44ms │ no change │
│ QQuery 4 │ 110.21ms │ 110.26ms │ no change │
│ QQuery 5 │ 210.11ms │ 207.85ms │ no change │
│ QQuery 6 │ 106.90ms │ 106.28ms │ no change │
│ QQuery 7 │ 307.57ms │ 301.40ms │ no change │
│ QQuery 8 │ 246.69ms │ 243.11ms │ no change │
│ QQuery 9 │ 366.93ms │ 375.37ms │ no change │
│ QQuery 10 │ 284.63ms │ 292.08ms │ no change │
│ QQuery 11 │ 63.49ms │ 61.19ms │ no change │
│ QQuery 12 │ 207.04ms │ 206.43ms │ no change │
│ QQuery 13 │ 311.59ms │ 310.80ms │ no change │
│ QQuery 14 │ 148.77ms │ 148.79ms │ no change │
│ QQuery 15 │ 103.07ms │ 101.74ms │ no change │
│ QQuery 16 │ 57.77ms │ 59.79ms │ no change │
│ QQuery 17 │ 240.35ms │ 230.32ms │ no change │
│ QQuery 18 │ 460.92ms │ 464.87ms │ no change │
│ QQuery 19 │ 316.94ms │ 315.97ms │ no change │
│ QQuery 20 │ 174.61ms │ 175.35ms │ no change │
│ QQuery 21 │ 442.66ms │ 444.59ms │ no change │
│ QQuery 22 │ 74.40ms │ 74.55ms │ no change │
└──────────────┴─────────────┴─────────────────────────────┴───────────┘
```
--
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]