alamb commented on a change in pull request #9695:
URL: https://github.com/apache/arrow/pull/9695#discussion_r595886251



##########
File path: rust/datafusion/src/logical_plan/builder.rs
##########
@@ -413,6 +436,32 @@ mod tests {
         Ok(())
     }
 
+    #[test]
+    fn plan_builder_union_combined_single_union() -> Result<()> {
+        let plan = LogicalPlanBuilder::scan_empty(
+            "employee.csv",
+            &employee_schema(),
+            Some(vec![3, 4]),
+        )?;
+
+        let plan = plan
+            .union(plan.build()?)?
+            .union(plan.build()?)?
+            .union(plan.build()?)?
+            .build()?;
+
+        // output has only one union
+        let expected = "Union\

Review comment:
       👍 




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

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


Reply via email to