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 2020/09/21 05:38:16 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #29798: [SPARK-32931][SQL] Unevaluable Expressions are not Foldable

cloud-fan commented on a change in pull request #29798:
URL: https://github.com/apache/spark/pull/29798#discussion_r491801731



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
##########
@@ -318,7 +321,6 @@ trait Unevaluable extends Expression {
  */
 trait RuntimeReplaceable extends UnaryExpression with Unevaluable {
   override def nullable: Boolean = child.nullable
-  override def foldable: Boolean = child.foldable

Review comment:
       This change is noop in practice, because we replace `RuntimeReplaceable` at the beginning of the optimizer, so foldable or not doesn't really matter.
   
   Semantically, it might be clearer to just make `RuntimeReplaceable` a pure delegator like `Alias`, but it complicates the expression tree. Anyway, this is out of the scope of this PR.




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



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