xin-aurora commented on code in PR #50552: URL: https://github.com/apache/spark/pull/50552#discussion_r2045683092
########## sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowFunctionFrame.scala: ########## @@ -183,7 +183,8 @@ abstract class OffsetWindowFunctionFrameBase( override def prepare(rows: ExternalAppendOnlyUnsafeRowArray): Unit = { resetStates(rows) if (absOffset > rows.length) { - fillDefaultValue(EmptyRow) Review Comment: > And I think it's not related to the partition size. The cause is apply expression on empty row. We can check the default expression and apply `fillDefaultValue(currentRow)` in write if it is not a Literal, or apply it is in prepare if it is a literal. Thank you for the suggestions! We had a similar idea for fixing this issue. I've updated `write` in `FrameLessOffsetWindowFunctionFrame` to call `fillDefaultValue(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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org