xumingming commented on code in PR #1701:
URL: https://github.com/apache/auron/pull/1701#discussion_r2594632555


##########
native-engine/datafusion-ext-plans/src/joins/smj/full_join.rs:
##########
@@ -160,9 +160,14 @@ impl<const L_OUTER: bool, const R_OUTER: bool> Joiner for 
FullJoiner<L_OUTER, R_
                         continue;
                     }
 
-                    for (&lidx, &ridx) in 
equal_lindices.iter().cartesian_product(&equal_rindices) {
-                        self.lindices.push(lidx);
-                        self.rindices.push(ridx);
+                    for &lidx in &equal_lindices {

Review Comment:
   How about:
   
   ```
   // Choose a better name.
   fn has_enough_room(&self, new_size: usize) -> bool {
     self.lindices.len() + new_size < self.join_params.batch_size
   }
   
   let new_size = equal_lindices.len() * equal_rindices.len()
   if (self.has_enough_room(self, new_size)) {
        // old cartesian_product way
   } else {
       // do more aggressive flush
   }
   ```
   
   And don't forget to clear the outdated batches.



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

Reply via email to