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/08/30 01:28:14 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #37672: [SPARK-40228][SQL] Do not simplify multiLike if child is not a cheap expression

cloud-fan commented on code in PR #37672:
URL: https://github.com/apache/spark/pull/37672#discussion_r957921008


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1147,7 +1147,7 @@ object CollapseProject extends Rule[LogicalPlan] with AliasHelper {
   /**
    * Check if the given expression is cheap that we can inline it.
    */
-  private def isCheap(e: Expression): Boolean = e match {
+  def isCheap(e: Expression): Boolean = e match {

Review Comment:
   Note that `isCheap` returns true for `PythonUDF`. It's OK for `CollapseProject` as the python udf planner will deduplicate python udfs in a single project operator. I'm not sure about multi-like optimization though.



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