Github user hvanhovell commented on a diff in the pull request: https://github.com/apache/spark/pull/10605#discussion_r48901213 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/Window.scala --- @@ -498,7 +548,13 @@ private[execution] final class SlidingWindowFunctionFrame( ubound: BoundOrdering) extends WindowFunctionFrame { /** Rows of the partition currently being processed. */ - private[this] var input: ArrayBuffer[InternalRow] = null + private[this] var input: ExternalRowBuffer = null + + /** The next row from `input`. */ + private[this] var nextRow: InternalRow = null + + /** The rows within current sliding window. */ + private[this] val buffer: util.Queue[InternalRow] = new util.ArrayDeque[InternalRow]() --- End diff -- Nit/Performance Paranoia: I would not type it as a ```Queue``` but as an ```ArrayDeque``` (or have scala infer the type). In order to ever prevent megamorphic calls.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org