You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/04/04 17:27:27 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5768: Add assert on hash children partition count

alamb commented on code in PR #5768:
URL: https://github.com/apache/arrow-datafusion/pull/5768#discussion_r1157553177


##########
datafusion/core/src/physical_plan/joins/hash_join.rs:
##########
@@ -377,6 +370,13 @@ impl ExecutionPlan for HashJoinExec {
     ) -> Result<SendableRecordBatchStream> {
         let on_left = self.on.iter().map(|on| on.0.clone()).collect::<Vec<_>>();
         let on_right = self.on.iter().map(|on| on.1.clone()).collect::<Vec<_>>();
+        if self.mode == PartitionMode::Partitioned
+            && self.left.output_partitioning() != self.right.output_partitioning()
+        {
+            return Err(DataFusionError::Plan(format!(

Review Comment:
   This is likely caused by some sort of code error, so an internal error may make more sense
   
   ```suggestion
               return Err(DataFusionError::Internal(format!(
   ```



##########
datafusion/core/src/physical_plan/joins/hash_join.rs:
##########
@@ -377,6 +370,13 @@ impl ExecutionPlan for HashJoinExec {
     ) -> Result<SendableRecordBatchStream> {
         let on_left = self.on.iter().map(|on| on.0.clone()).collect::<Vec<_>>();
         let on_right = self.on.iter().map(|on| on.1.clone()).collect::<Vec<_>>();
+        if self.mode == PartitionMode::Partitioned
+            && self.left.output_partitioning() != self.right.output_partitioning()
+        {
+            return Err(DataFusionError::Plan(format!(

Review Comment:
   The same comment applies to the code below as well



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org