Dandandan commented on code in PR #24517:
URL: https://github.com/apache/datafusion/pull/24517#discussion_r3821956059


##########
datafusion/physical-plan/src/joins/sort_merge_join/exec.rs:
##########
@@ -746,6 +835,11 @@ impl ExecutionPlan for SortMergeJoinExec {
                         filter,
                         sort_options,
                         null_equality: null_equality.into(),
+                        projection: projection
+                            .iter()
+                            .flatten()
+                            .map(|index| *index as u32)
+                            .collect(),

Review Comment:
   Good finding!



##########
datafusion/physical-plan/src/joins/sort_merge_join/exec.rs:
##########
@@ -589,7 +659,16 @@ impl ExecutionPlan for SortMergeJoinExec {
                 spill_manager,
                 context.runtime_env(),
             )
-        }
+        }?;
+
+        let Some(projection) = self.projection.clone() else {
+            return Ok(joined);
+        };

Review Comment:
   Yeah good one



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