andygrove commented on code in PR #1034:
URL: https://github.com/apache/datafusion-comet/pull/1034#discussion_r1815594934


##########
native/core/src/execution/shuffle/row.rs:
##########
@@ -235,6 +250,143 @@ impl SparkUnsafeRow {
         }
     }
 
+    #[allow(clippy::needless_range_loop)]
+    pub fn get_rows_from_arrays(
+        schema: Vec<ArrowDataType>,
+        arrays: Vec<ArrayRef>,
+        num_rows: usize,
+        num_cols: usize,
+        addr: usize,
+    ) {
+        let mut row_start_addr: usize = addr;
+        for i in 0..num_rows {
+            let mut row = SparkUnsafeRow::new(&schema);
+            let row_size = SparkUnsafeRow::get_row_bitset_width(schema.len()) 
+ 8 * num_cols;

Review Comment:
   perhaps the compiler already optimizes this out, but this could happen 
outside of the loop?



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