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



##########
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 not what you'd actually want.
   I'm actually really curious why `RuntimeReplaceable` has to implement 
`Unevaluable` in the first place. It doesn't really make sense. We could just 
turn `RuntimeReplaceable` into a proper wrapper that delegates everything, 
right?

##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
##########
@@ -327,7 +327,6 @@ case class InSubquery(values: Seq[Expression], query: 
ListQuery)
 
   override def children: Seq[Expression] = values :+ query
   override def nullable: Boolean = children.exists(_.nullable)
-  override def foldable: Boolean = children.forall(_.foldable)

Review comment:
       Let's have some more confirmation of why it was written this way 
originally, and whether or not we're losing anything by just making `folable` 
always `false` here.

##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala
##########
@@ -365,14 +360,6 @@ abstract class OffsetWindowFunction
 
   override def children: Seq[Expression] = Seq(input, offset, default)
 
-  /*

Review comment:
       Can we keep the original comment and just add a new line of comment that 
says `foldable` is properly set to `false` from `Unevaluable`?




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