-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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-45940][PYTHON] Add InputPartition to DataSourceReader interface #44085
Closed
allisonwang-db
wants to merge
3
commits into
apache:master
from
allisonwang-db:spark-45940-input-partition
Closed
[SPARK-45940][PYTHON] Add InputPartition to DataSourceReader interface #44085
allisonwang-db
wants to merge
3
commits into
apache:master
from
allisonwang-db:spark-45940-input-partition
Conversation
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
HyukjinKwon
reviewed
Nov 30, 2023
HyukjinKwon
reviewed
Nov 30, 2023
HyukjinKwon
reviewed
Nov 30, 2023
HyukjinKwon
approved these changes
Nov 30, 2023
The test failure seems unrelated |
Merged to master. |
HyukjinKwon
pushed a commit
that referenced
this pull request
Dec 4, 2023
…on and PySpark environments are available ### What changes were proposed in this pull request? This is a test-only follow-up PR for #44085 to make Python data source tests depend on the availability of Python and PySpark environments. ### Why are the changes needed? To fix tests. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? test only. ### Was this patch authored or co-authored using generative AI tooling? No Closes #44164 from allisonwang-db/spark-45940-follow-up. Authored-by: allisonwang-db <allison.wang@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
asl3
pushed a commit
to asl3/spark
that referenced
this pull request
Dec 5, 2023
### What changes were proposed in this pull request? This PR introduces a new Python class `InputPartition` that represents the partition value returned by the `partitions` method in DataSourceReader. ### Why are the changes needed? Before this PR, the `partitions` method can return anything, and it can be confusing to infer what is the `partition` argument in the `read(self, partition)` method. Adding `InputPartition` can make the Python data source API more intuitive and user-friendly. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? New unit tests. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#44085 from allisonwang-db/spark-45940-input-partition. Authored-by: allisonwang-db <allison.wang@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
asl3
pushed a commit
to asl3/spark
that referenced
this pull request
Dec 5, 2023
…on and PySpark environments are available ### What changes were proposed in this pull request? This is a test-only follow-up PR for apache#44085 to make Python data source tests depend on the availability of Python and PySpark environments. ### Why are the changes needed? To fix tests. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? test only. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#44164 from allisonwang-db/spark-45940-follow-up. Authored-by: allisonwang-db <allison.wang@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
dbatomic
pushed a commit
to dbatomic/spark
that referenced
this pull request
Dec 11, 2023
…on and PySpark environments are available ### What changes were proposed in this pull request? This is a test-only follow-up PR for apache#44085 to make Python data source tests depend on the availability of Python and PySpark environments. ### Why are the changes needed? To fix tests. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? test only. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#44164 from allisonwang-db/spark-45940-follow-up. Authored-by: allisonwang-db <allison.wang@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR introduces a new Python class
InputPartition
that represents the partition value returned by thepartitions
method in DataSourceReader.Why are the changes needed?
Before this PR, the
partitions
method can return anything, and it can be confusing to infer what is thepartition
argument in theread(self, partition)
method.Adding
InputPartition
can make the Python data source API more intuitive and user-friendly.Does this PR introduce any user-facing change?
No
How was this patch tested?
New unit tests.
Was this patch authored or co-authored using generative AI tooling?
No