jayzhan211 commented on code in PR #24963:
URL: https://github.com/apache/datafusion/pull/24963#discussion_r3944262651


##########
datafusion/physical-plan/src/union.rs:
##########
@@ -694,8 +711,14 @@ impl InterleaveExec {
         schema: SchemaRef,
     ) -> Result<PlanProperties> {
         let eq_properties = EquivalenceProperties::new(schema);
-        // Get output partitioning:
-        let output_partitioning = inputs[0].output_partitioning().clone();
+        // Get output partitioning. Only claim the shared hash / range layout
+        // when every input actually has it (see `try_new_unchecked`).
+        let first_partitioning = inputs[0].output_partitioning();
+        let output_partitioning = if can_interleave(inputs.iter()) {
+            first_partitioning.clone()
+        } else {
+            
Partitioning::UnknownPartitioning(first_partitioning.partition_count())

Review Comment:
   This makes sense



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