-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-47270][SQL] Dataset.isEmpty projects CommandResults locally #45373
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
Conversation
|
@peter-toth @HyukjinKwon @cloud-fan could you please take a look? |
|
I don't fully get this issue. In #40779 the |
|
The |
peter-toth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for clarifying my questions.
|
thanks, merging to master! |
### What changes were proposed in this pull request? Similar to apache#40779, `Dataset.isEmpty` should also not trigger job execution on CommandResults. This PR converts `CommandResult` to `LocalRelation` in `Dataset.isEmpty` method. ### Why are the changes needed? A simple `spark.sql("show tables").isEmpty` shouldn not require an executor. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Added new UT. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#45373 from wForget/SPARK-47270. Authored-by: Zhen Wang <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
…s locally (apache#600) [SPARK-47270][SQL] Dataset.isEmpty projects CommandResults locally ### What changes were proposed in this pull request? Similar to apache#40779, `Dataset.isEmpty` should also not trigger job execution on CommandResults. This PR converts `CommandResult` to `LocalRelation` in `Dataset.isEmpty` method. ### Why are the changes needed? A simple `spark.sql("show tables").isEmpty` shouldn not require an executor. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Added new UT. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#45373 from wForget/SPARK-47270. Authored-by: Zhen Wang <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> Co-authored-by: Zhen Wang <[email protected]>
What changes were proposed in this pull request?
Similar to #40779,
Dataset.isEmptyshould also not trigger job execution on CommandResults.This PR converts
CommandResulttoLocalRelationinDataset.isEmptymethod.Why are the changes needed?
A simple
spark.sql("show tables").isEmptyshouldn not require an executor.Does this PR introduce any user-facing change?
No
How was this patch tested?
Added new UT.
Was this patch authored or co-authored using generative AI tooling?
No