-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-46227][SQL] Move withSQLConf from SQLHelper to SQLConfHelper
#44142
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
|
cc @dongjoon-hyun @cloud-fan thank you |
withSQLConf from SQLHelper trait to SQLConfHelper traitwithSQLConf from SQLHelper to SQLConfHelper
dongjoon-hyun
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.
+1, LGTM.
Thank you so much, @ulysses-you .
| * Sets all SQL configurations specified in `pairs`, calls `f`, and then restores all SQL | ||
| * configurations. | ||
| */ | ||
| protected def withSQLConf[T](pairs: (String, String)*)(f: => T): T = { |
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.
Why change it to type parameter?
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.
Then it can return things, looks reasonable
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.
Ya, the PR description descirbed the goal, @beliefer
To make it easy to use such case: val x = withSQLConf {}, this pr also changes its return type.
|
Merged to master for Apache Spark 4. |
|
Thank you, @ulysses-you , @beliefer , @cloud-fan . |
…per`
### What changes were proposed in this pull request?
This pr moves method `withSQLConf` from `SQLHelper` in catalyst test module to `SQLConfHelper` trait in catalyst module. To make it easy to use such case: `val x = withSQLConf {}`, this pr also changes its return type.
### Why are the changes needed?
A part of apache#44013
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
Pass CI
### Was this patch authored or co-authored using generative AI tooling?
no
Closes apache#44142 from ulysses-you/withSQLConf.
Authored-by: ulysses-you <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
…per`
### What changes were proposed in this pull request?
This pr moves method `withSQLConf` from `SQLHelper` in catalyst test module to `SQLConfHelper` trait in catalyst module. To make it easy to use such case: `val x = withSQLConf {}`, this pr also changes its return type.
### Why are the changes needed?
A part of apache#44013
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
Pass CI
### Was this patch authored or co-authored using generative AI tooling?
no
Closes apache#44142 from ulysses-you/withSQLConf.
Authored-by: ulysses-you <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
This pr moves method
withSQLConffromSQLHelperin catalyst test module toSQLConfHelpertrait in catalyst module. To make it easy to use such case:val x = withSQLConf {}, this pr also changes its return type.Why are the changes needed?
A part of #44013
Does this PR introduce any user-facing change?
no
How was this patch tested?
Pass CI
Was this patch authored or co-authored using generative AI tooling?
no