Skip to content

Conversation

@HeartSaVioR
Copy link
Contributor

What changes were proposed in this pull request?

Fix the way applyInPandasWithState's setTimeoutTimestamp() handles argument of datetime

Why are the changes needed?

In applyInPandasWithState(), when state.setTimeoutTimestamp() is passed in with datetime.datetime type, it doesn't function as expected. Fix it.
Also, fix another bug of reporting VALUE_NOT_POSITIVE. This issue will trigger when the converted value is 0.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Add unit test coverage for thie scenario

Was this patch authored or co-authored using generative AI tooling?

No.

…ting timeout in applyInPandasWithState

Fix the way applyInPandasWithState's setTimeoutTimestamp() handles argument of datetime

In applyInPandasWithState(), when state.setTimeoutTimestamp() is passed in with datetime.datetime type, it doesn't function as expected. Fix it.
Also, fix another bug of reporting VALUE_NOT_POSITIVE. This issue will trigger when the converted value is 0.

No.

Add unit test coverage for thie scenario

No.

Closes apache#47398 from siying/state_set_timeout.

Lead-authored-by: Siying Dong <siying.dong@databricks.com>
Co-authored-by: Siying Dong <dong.sy@gmail.com>
Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com>
(cherry picked from commit a54daa1)
Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com>
@HeartSaVioR
Copy link
Contributor Author

This is to merge #47398 into 3.4 with testing CI. Since it's +1ed and the merge conflict was trivial (error class), I'll merge once the CI is green.

@HeartSaVioR
Copy link
Contributor Author

Thanks! Merging to 3.4.

HeartSaVioR pushed a commit that referenced this pull request Jul 19, 2024
…r setting timeout in applyInPandasWithState

### What changes were proposed in this pull request?
Fix the way applyInPandasWithState's setTimeoutTimestamp() handles argument of datetime

### Why are the changes needed?
In applyInPandasWithState(), when state.setTimeoutTimestamp() is passed in with datetime.datetime type, it doesn't function as expected. Fix it.
Also, fix another bug of reporting VALUE_NOT_POSITIVE. This issue will trigger when the converted value is 0.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Add unit test coverage for thie scenario

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #47413 from HeartSaVioR/SPARK-48934-3.4.

Authored-by: Siying Dong <siying.dong@databricks.com>
Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants