cloud-fan commented on code in PR #43507:
URL: https://github.com/apache/spark/pull/43507#discussion_r1400162514
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowFunctionFrame.scala:
##########
@@ -196,24 +224,15 @@ class FrameLessOffsetWindowFunctionFrame(
offset: Int,
ignoreNulls: Boolean = false)
extends OffsetWindowFunctionFrameBase(
- target, ordinal, expressions, inputSchema, newMutableProjection, offset) {
+ target, ordinal, expressions, inputSchema, newMutableProjection, offset,
ignoreNulls) {
- override def prepare(rows: ExternalAppendOnlyUnsafeRowArray): Unit = {
- resetStates(rows)
- if (ignoreNulls) {
- if (Math.abs(offset) > rows.length) {
- fillDefaultValue(EmptyRow)
Review Comment:
This PR is not a pure refactor. Some logic is changed. e.g. before this PR,
`fillDefaultValue(EmptyRow)` is never called if `ignoreNulls == false`. We need
to understand the code better before making these changes.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]