rednaxelafx commented on a change in pull request #29798:
URL: https://github.com/apache/spark/pull/29798#discussion_r492281965



##########
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:
       > but it complicates the expression tree
   
   Why would it complicate the expression tree? There's a `TaggingExpression` 
trait 
(https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/constraintExpressions.scala#L24)
 that'd handle this perfectly. Making `RuntimeReplaceable` implement 
`TaggingExpression` instead of `Unevaluable` makes much more sense to me. It'll 
still retain the same semantics of being replaced early.
   
   I agree that we can do it in a separate PR, but I'd really like to make sure 
the refactoring done while we're at it.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to