forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-41261][PYTHON][SS] Fix issue for applyInPandasWithState when t…
…he columns of grouping keys are not placed in order from earliest ### What changes were proposed in this pull request? This PR fixes the issue for applyInPandasWithState, which is triggered with the columns of grouping keys are not placed in order from earliest. If the condition is met, user function may get "incorrect" value of the key, including `None`. This is because the projection for the value is co-used between normal input row and row for timed-out state. The projection assumed that the schema for the row is same as output schema of the child node, whereas row for timed-out state is constructed via concatenating key row + null value row. This PR creates a separate projection for the row for timed-out state, so that the projection can pick up the values for grouping columns correctly. ### Why are the changes needed? Without this fix, user function may get "incorrect" value of the key, including `None`. ### Does this PR introduce _any_ user-facing change? No. This feature is not released yet. ### How was this patch tested? New test case. Closes apache#38798 from HeartSaVioR/SPARK-41261. Authored-by: Jungtaek Lim <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
- Loading branch information
1 parent
77e2d45
commit 436ce5f
Showing
2 changed files
with
95 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters