jonathanc-n commented on code in PR #16380:
URL: https://github.com/apache/datafusion/pull/16380#discussion_r2141135830


##########
datafusion/physical-plan/src/joins/hash_join.rs:
##########
@@ -95,9 +96,11 @@ struct JoinLeftData {
     /// The hash table with indices into `batch`
     hash_map: JoinHashMap,
     /// The input rows for the build side
-    batch: RecordBatch,
-    /// The build side on expressions values
-    values: Vec<ArrayRef>,
+    batch: Vec<RecordBatch>,

Review Comment:
   @Dandandan Does this look like what you were looking for



##########
datafusion/physical-plan/src/joins/hash_join.rs:
##########
@@ -1372,15 +1407,16 @@ pub fn equal_rows_arr(
     // The results are then folded (combined) using the and function to get a 
final equality result.
     equal = iter
         .map(|(left, right)| {
-            let arr_left = take(left.as_ref(), indices_left, None)?;
+            let left_refs: Vec<&dyn Array> = 
left.iter().map(Arc::as_ref).collect();
+            let arr_left = interleave(&left_refs, indices_left)?;
             let arr_right = take(right.as_ref(), indices_right, None)?;
             eq_dyn_null(arr_left.as_ref(), arr_right.as_ref(), 
null_equals_null)
         })
         .try_fold(equal, |acc, equal2| and(&acc, &equal2?))?;
 
     let filter_builder = FilterBuilder::new(&equal).optimize().build();
 
-    let left_filtered = filter_builder.filter(indices_left)?;
+    let left_filtered = filter_builder.filter(indices_left)?; // annoying

Review Comment:
   Currently this is a bit annoying, do you know how we can filter on this left 
indice (Vec<(usize, usize)>)@Dandandan 



##########
datafusion/physical-plan/src/joins/utils.rs:
##########
@@ -850,6 +850,43 @@ pub(crate) fn apply_join_filter_to_indices(
     ))
 }
 
+
+pub(crate) fn apply_join_filter_to_hash_indices(

Review Comment:
   This is temporary new functions, just so I can test it out first by 
isolating it for 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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to