beliefer commented on a change in pull request #29800:
URL: https://github.com/apache/spark/pull/29800#discussion_r503178031
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala
##########
@@ -617,10 +639,16 @@ case class CumeDist() extends RowNumberLike with
SizeBasedWindowFunction {
group = "window_funcs")
// scalastyle:on line.size.limit line.contains.tab
case class NthValue(input: Expression, offsetExpr: Expression, ignoreNulls:
Boolean)
- extends AggregateWindowFunction with ImplicitCastInputTypes {
+ extends AggregateWindowFunction with OffsetWindowSpec with
ImplicitCastInputTypes {
def this(child: Expression, offset: Expression) = this(child, offset, false)
+ override lazy val default = Literal.create(null, input.dataType)
+
+ override val direction = Ascending
+
+ override val isRelative = false
+
override def children: Seq[Expression] = input :: offsetExpr :: Nil
override val frame: WindowFrame = UnspecifiedFrame
Review comment:
`NthValue` extends `AggregateWindowFunction` and later override frame as:
`override val frame: WindowFrame = SpecifiedWindowFrame(RowFrame,
UnboundedPreceding, CurrentRow)`
----------------------------------------------------------------
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]