2010YOUY01 commented on code in PR #19468:
URL: https://github.com/apache/datafusion/pull/19468#discussion_r2650431413


##########
datafusion/physical-plan/src/joins/nested_loop_join.rs:
##########
@@ -550,17 +550,22 @@ impl ExecutionPlan for NestedLoopJoinExec {
     }
 
     fn partition_statistics(&self, partition: Option<usize>) -> 
Result<Statistics> {
-        if partition.is_some() {
-            return Ok(Statistics::new_unknown(&self.schema()));
-        }
         let join_columns = Vec::new();
-        estimate_join_statistics(
-            self.left.partition_statistics(None)?,
-            self.right.partition_statistics(None)?,
+        let left_stats = self.left.partition_statistics(None)?;
+        let right_stats = match partition {
+            Some(partition) => 
self.right.partition_statistics(Some(partition))?,
+            None => self.right.partition_statistics(None)?,
+        };
+
+        let stats = estimate_join_statistics(

Review Comment:
   Since you requested my review, I’m not yet familiar with this statistics 
propagation module, so I’ll need some time in the future to read through the 
relevant code before I can effectively review and approve it.
   
   This looks like a nice contribution—thank you.



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