cloud-fan commented on a change in pull request #31325:
URL: https://github.com/apache/spark/pull/31325#discussion_r564239911
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowFunctionFrame.scala
##########
@@ -299,13 +309,10 @@ class UnboundedOffsetWindowFunctionFrame(
assert(offset > 0)
override def prepare(rows: ExternalAppendOnlyUnsafeRowArray): Unit = {
- input = rows
- if (offset > input.length) {
+ if (offset > rows.length) {
Review comment:
I was trying to avoid calling `input.generateIterator()`, as it was not
called before when `offset > rows.length`, and it may cause perf regression as
the name `generateIterator` sounds expensive.
----------------------------------------------------------------
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]