rangadi commented on code in PR #40561: URL: https://github.com/apache/spark/pull/40561#discussion_r1153505179
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala: ########## @@ -679,6 +679,8 @@ object RemoveNoopUnion extends Rule[LogicalPlan] { d.withNewChildren(Seq(simplifyUnion(u))) case d @ Deduplicate(_, u: Union) => d.withNewChildren(Seq(simplifyUnion(u))) + case d @ DeduplicateWithinWatermark(_, u: Union) => Review Comment: @zsxwing one more thing to consider: Shall we extend existing 'DropDuplicate' Node to support this use case rather than introducing another logical node 'DropDuplicatesWithinWatermark'. It does not change the API, just the implementation. I am suggesting adding this option to exiting node. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org