Github user jiangxb1987 commented on a diff in the pull request:
https://github.com/apache/spark/pull/18634#discussion_r127696829
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowFunctionFrame.scala
---
@@ -212,6 +203,21 @@ private[window] final class SlidingWindowFunctionFrame(
bufferUpdated = true
}
+ // Add all rows to the buffer for which the input row value is equal
to or less than
+ // the output row upper bound.
+ while (nextRow != null && ubound.compare(nextRow, inputHighIndex,
current, index) <= 0) {
--- End diff --
How about:
```
while (nextRow != null && ubound.compare(nextRow, inputHighIndex,
current, index) <= 0) {
if (lbound.compare(nextRow, inputLowIndex, current, index) < 0) {
inputLowIndex += 1
} else {
buffer.add(nextRow.copy())
bufferUpdated = true
}
nextRow = WindowFunctionFrame.getNextOrNull(inputIterator)
inputHighIndex += 1
}
```
?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]