You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by dh...@apache.org on 2023/06/21 08:26:45 UTC

[arrow-datafusion] branch vectorized_collision updated: Remove some ownership / clones

This is an automated email from the ASF dual-hosted git repository.

dheres pushed a commit to branch vectorized_collision
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/vectorized_collision by this push:
     new bd5a33ac7c Remove some ownership / clones
bd5a33ac7c is described below

commit bd5a33ac7c288e6af96ce3a58404b7fd02c28cb2
Author: Daniƫl Heres <da...@coralogix.com>
AuthorDate: Wed Jun 21 10:26:38 2023 +0200

    Remove some ownership / clones
---
 datafusion/core/src/physical_plan/joins/hash_join.rs     | 16 ++++++++--------
 .../core/src/physical_plan/joins/nested_loop_join.rs     |  8 ++++----
 .../core/src/physical_plan/joins/symmetric_hash_join.rs  |  8 ++++----
 datafusion/core/src/physical_plan/joins/utils.rs         |  8 ++++----
 4 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/datafusion/core/src/physical_plan/joins/hash_join.rs b/datafusion/core/src/physical_plan/joins/hash_join.rs
index e49e3ac168..acfd8ba578 100644
--- a/datafusion/core/src/physical_plan/joins/hash_join.rs
+++ b/datafusion/core/src/physical_plan/joins/hash_join.rs
@@ -733,8 +733,8 @@ pub fn build_equal_condition_join_indices(
     };
 
     equal_rows_arr(
-        left,
-        right,
+        &left,
+        &right,
         &build_join_values,
         &keys_values,
         null_equals_null,
@@ -1097,8 +1097,8 @@ fn eq_dyn_null(
 }
 
 pub fn equal_rows_arr(
-    indices_left: UInt64Array,
-    indices_right: UInt32Array,
+    indices_left: &UInt64Array,
+    indices_right: &UInt32Array,
     left_arrays: &[ArrayRef],
     right_arrays: &[ArrayRef],
     null_equals_null: bool,
@@ -1225,8 +1225,8 @@ impl HashJoinStream {
                                 &self.schema,
                                 &left_data.1,
                                 &batch,
-                                left_side,
-                                right_side,
+                                &left_side,
+                                &right_side,
                                 &self.column_indices,
                                 JoinSide::Left,
                             );
@@ -1257,8 +1257,8 @@ impl HashJoinStream {
                             &self.schema,
                             &left_data.1,
                             &empty_right_batch,
-                            left_side,
-                            right_side,
+                            &left_side,
+                            &right_side,
                             &self.column_indices,
                             JoinSide::Left,
                         );
diff --git a/datafusion/core/src/physical_plan/joins/nested_loop_join.rs b/datafusion/core/src/physical_plan/joins/nested_loop_join.rs
index 8de5c76e51..bb8c190222 100644
--- a/datafusion/core/src/physical_plan/joins/nested_loop_join.rs
+++ b/datafusion/core/src/physical_plan/joins/nested_loop_join.rs
@@ -482,8 +482,8 @@ impl NestedLoopJoinStream {
                             &self.schema,
                             left_data,
                             &empty_right_batch,
-                            left_side,
-                            right_side,
+                            &left_side,
+                            &right_side,
                             &self.column_indices,
                             JoinSide::Left,
                         );
@@ -611,8 +611,8 @@ fn join_left_and_right_batch(
                 schema,
                 left_batch,
                 right_batch,
-                left_side,
-                right_side,
+                &left_side,
+                &right_side,
                 column_indices,
                 JoinSide::Left,
             )
diff --git a/datafusion/core/src/physical_plan/joins/symmetric_hash_join.rs b/datafusion/core/src/physical_plan/joins/symmetric_hash_join.rs
index 68a8596d66..490f18ccf4 100644
--- a/datafusion/core/src/physical_plan/joins/symmetric_hash_join.rs
+++ b/datafusion/core/src/physical_plan/joins/symmetric_hash_join.rs
@@ -1369,8 +1369,8 @@ impl OneSideHashJoiner {
                 schema,
                 &self.input_buffer,
                 probe_batch,
-                build_indices,
-                probe_indices,
+                &build_indices,
+                &probe_indices,
                 column_indices,
                 self.build_side,
             )
@@ -1421,8 +1421,8 @@ impl OneSideHashJoiner {
                 output_schema.as_ref(),
                 &self.input_buffer,
                 &empty_probe_batch,
-                build_indices,
-                probe_indices,
+                &build_indices,
+                &probe_indices,
                 column_indices,
                 self.build_side,
             )
diff --git a/datafusion/core/src/physical_plan/joins/utils.rs b/datafusion/core/src/physical_plan/joins/utils.rs
index f7e81b5add..a7624fcd07 100644
--- a/datafusion/core/src/physical_plan/joins/utils.rs
+++ b/datafusion/core/src/physical_plan/joins/utils.rs
@@ -784,8 +784,8 @@ pub(crate) fn apply_join_filter_to_indices(
         filter.schema(),
         build_input_buffer,
         probe_batch,
-        build_indices.clone(),
-        probe_indices.clone(),
+        &build_indices,
+        &probe_indices,
         filter.column_indices(),
         build_side,
     )?;
@@ -809,8 +809,8 @@ pub(crate) fn build_batch_from_indices(
     schema: &Schema,
     build_input_buffer: &RecordBatch,
     probe_batch: &RecordBatch,
-    build_indices: UInt64Array,
-    probe_indices: UInt32Array,
+    build_indices: &UInt64Array,
+    probe_indices: &UInt32Array,
     column_indices: &[ColumnIndex],
     build_side: JoinSide,
 ) -> Result<RecordBatch> {