xin-aurora commented on PR #50552: URL: https://github.com/apache/spark/pull/50552#issuecomment-2829380069
> LGTM, can we update `UnboundedPrecedingOffsetWindowFunctionFrame#write` to call `fillDefaultValue` as well? It can be a potential bug that we'd better fix to it now. I found both `UnboundedPrecedingOffsetWindowFunctionFrame#write` and `UnboundedOffsetWindowFunctionFrame#write` do not handle non-literal default values. However, they don't trigger the same error that `lead/lag` do (where the offset exceeds the window group size). I tried `nth_value()` with an unbounded window. Since`nth_value()` doesn't allow assigning default values directly, it doesn't trigger the error. We can run something like `nth_value($"id", 3, true)` instead of `nth_value($"id", 3, $"id")` or `nth_value($"id", 3, -1)`. We could fix this potential bug when `nth_value()` adds support for assigning default values. I can leave a comment about this bug in the two `write` functions if you think that would be helpful. Please also let me know @cloud-fan -- 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