skambha commented on a change in pull request #24593: [SPARK-27692][SQL] Add 
new optimizer rule to evaluate the deterministic scala udf only once if all 
inputs are literals
URL: https://github.com/apache/spark/pull/24593#discussion_r285798913
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ##########
 @@ -1719,3 +1720,20 @@ object OptimizeLimitZero extends Rule[LogicalPlan] {
       empty(ll)
   }
 }
+
+/**
+ * If the UDF is deterministic and if the children are all literal, we can 
replace the udf
+ * with the output of the udf serialized
+ */
+object DeterministicLiteralUDF extends Rule[LogicalPlan] {
 
 Review comment:
   Moved rule to a new file in the last push. 

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


With regards,
Apache Git Services

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

Reply via email to