Skip to content

Commit 590eef5

Browse files
committed
address comments
1 parent ca4b371 commit 590eef5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ case class WindowSpecDefinition(
4545

4646
override def children: Seq[Expression] = partitionSpec ++ orderSpec :+ frameSpecification
4747

48+
/*
49+
* The result of an OffsetWindowFunction is dependent on the frame in which the
50+
* OffsetWindowFunction is executed, the input expression and the default expression. Even when
51+
* both the input and the default expression are foldable, the result is still not foldable due to
52+
* the frame.
53+
*
54+
* Note, the value of foldable is set to false in the trait Unevaluable
55+
*
56+
* override def foldable: Boolean = false
57+
*/
58+
4859
override lazy val resolved: Boolean =
4960
childrenResolved && checkInputDataTypes().isSuccess &&
5061
frameSpecification.isInstanceOf[SpecifiedWindowFrame]

0 commit comments

Comments
 (0)