alamb commented on code in PR #18678:
URL: https://github.com/apache/datafusion/pull/18678#discussion_r2528722132


##########
datafusion/optimizer/src/optimize_unions.rs:
##########
@@ -55,6 +55,9 @@ impl OptimizerRule for EliminateNestedUnion {
         _config: &dyn OptimizerConfig,
     ) -> Result<Transformed<LogicalPlan>> {
         match plan {
+            LogicalPlan::Union(Union { mut inputs, .. }) if inputs.len() == 1 
=> Ok(

Review Comment:
   > (Or could rename away from EliminateNestedUnions to something like 
SimplifyUnions to be all encompassing)
   
   I like this idea -- done in  9041a171c12c2ed4ddac5a69a63cb8851ee27252



##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -242,7 +241,6 @@ impl Optimizer {
             Arc::new(EliminateLimit::new()),
             Arc::new(PropagateEmptyRelation::new()),
             // Must be after PropagateEmptyRelation

Review Comment:
   Since all tests pass with `OptimizeUnions` in its current location I think 
we can just remove this comment as stale. I have done so in 4ed07868f7



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