You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/08 11:03:21 UTC

[GitHub] [spark] MrDLontheway commented on a diff in pull request #38893: [Spark-40099][SQL] Merge adjacent CaseWhen branches if their values are the same

MrDLontheway commented on code in PR #38893:
URL: https://github.com/apache/spark/pull/38893#discussion_r1043227501


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -639,6 +639,26 @@ object RemoveNoopOperators extends Rule[LogicalPlan] {
   }
 }
 
+/**
+ * Merge case condition expression with same value.
+ */
+object MergeConditionWithValue extends Rule[LogicalPlan] {

Review Comment:
   this is 2000 branches run time
   <img width="1260" alt="image" src="https://user-images.githubusercontent.com/29403543/206430556-08ffe134-2d3e-48ab-bdb1-d941957869e1.png">
   



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org