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 2019/05/20 18:42:32 UTC

[GitHub] [spark] pattern 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

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

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/UDFSuite.scala
 ##########
 @@ -151,6 +152,41 @@ class UDFSuite extends QueryTest with SharedSQLContext {
     assert(sql("SELECT strLenScala('test', 1)").head().getInt(0) === 5)
   }
 
+  test("Deterministic and literal UDF optimization") {
+    def udfNodesCount(plan: LogicalPlan): Int = {
 
 Review comment:
   Might this `udfNodesCount` function be pulled up outside of this test for future reuse in other tests?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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