Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-39215][PYTHON] Reduce Py4J calls in pyspark.sql.utils.is_timestamp_ntz_preferred #36587

Closed
wants to merge 3 commits into from

Conversation

HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

This PR proposes to reduce the number of Py4J calls at pyspark.sql.utils.is_timestamp_ntz_preferred by having a single method to check.

Why are the changes needed?

For better performance, and simplicity in the code.

Does this PR introduce any user-facing change?

Yes, the number of Py4J calls will be reduced, and the driver side access will become faster.

How was this patch tested?

Existing tests should cover.

@HyukjinKwon
Copy link
Member Author

cc @ueshin

Copy link
Member

@ueshin ueshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM.

python/pyspark/sql/utils.py Outdated Show resolved Hide resolved
@HyukjinKwon HyukjinKwon force-pushed the SPARK-39215 branch 3 times, most recently from 9fd4646 to 2f5e5dd Compare May 18, 2022 02:46
@HyukjinKwon
Copy link
Member Author

Merged to master and branch-3.3.

HyukjinKwon added a commit that referenced this pull request May 18, 2022
…tamp_ntz_preferred

### What changes were proposed in this pull request?

This PR proposes to reduce the number of Py4J calls at `pyspark.sql.utils.is_timestamp_ntz_preferred` by having a single method to check.

### Why are the changes needed?

For better performance, and simplicity in the code.

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

Yes, the number of Py4J calls will be reduced, and the driver side access will become faster.

### How was this patch tested?

Existing tests should cover.

Closes #36587 from HyukjinKwon/SPARK-39215.

Lead-authored-by: Hyukjin Kwon <gurwls223@apache.org>
Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 28e7764)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@HyukjinKwon HyukjinKwon deleted the SPARK-39215 branch January 15, 2024 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants