devanbenz commented on code in PR #26249:
URL: https://github.com/apache/datafusion/pull/26249#discussion_r4426416857


##########
datafusion/physical-plan/src/joins/hash_join/shared_bounds.rs:
##########
@@ -685,6 +712,20 @@ impl SharedBuildAccumulator {
                 }) => {
                     real_partition_ids.push(partition_id);
                     keys_have_null |= partition_keys_have_null;
+                    lookups = match (&pushdown, lookups) {
+                        (PushdownStrategy::Map(map, _), Some(mut lookups))
+                            if matches!(map.as_ref(), Map::HashMap(_)) =>
+                        {
+                            
lookups.push(PartitionLookup::Map(Arc::clone(map)));
+                            Some(lookups)
+                        }
+                        _ => None,
+                    };
+                    merged_bounds = match (merged_bounds, 
real_partition_ids.len()) {
+                        (None, 1) => Some(bounds.clone()),
+                        (Some(merged), _) => merged.union(&bounds),

Review Comment:
   >  It looks like it's only the case when two partitions have bounds for a 
different number of columns, which I think should never happen. So maybe an 
unwrap / debug assert is good enough.
   
   This should be the case. I've modified the code to reflect this. 



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