-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-34571][SQL][CORE] Provide a more convenient way to deprecate/remove/alternate configs #31684
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 @cloud-fan @HyukjinKwon @MaxGekk any idea about this? |
MaxGekk
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.
This pr proposes to add deprecated()/ removed() / alternated() functions to ConfigBuilder in order to provide more convenient ways to do these stuff.
I think if you propose new approach, you should restore all removed configs and make them as .removed() then. Don't think it is good idea to maintain two approach at the same time.
maintains the active configs and deprecated/alternated/removed configs separately,
which is not convenient when developers want to deprecate configs and not good to maintain for the long term.
IMHO, gathering all removed/deprecated configs in one place is convenient. Currently, removed configs are actually removed but you propose to keep them forever (just mark them as removed), am I right?
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #135563 has finished for PR 31684 at commit
|
Yeah, I was thinking that too. But I'd like to see people's feedback before going further.
I think it's convenient (fast) for people to know what are deprecated or removed configs now. I think u But it's not convenient for developers to maintain. For example, to deprecate a config with the current way, a developer needs to manually add
Yes. But those removed configs don't disappear from Spark totally as they are still maintained in the way of |
|
Besides, I'm thinking we may be able to extend the SQL configuration document with the new proposal. For example, we can add the current status of a conf, e.g., whether it's deprecated or removed, etc. like the |
| this | ||
| } | ||
|
|
||
| def alternated( |
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.
nit but alternated -> alternative
| * @param translation A translation function for converting old config values into new ones. | ||
| */ | ||
| private case class AlternateConfig( | ||
| private[spark] case class AlternateConfig( |
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.
Let's fix all Alternate -> Alternative
|
Can we add deprecate and alternative ones first? For removal one, I would encourage to do it in a separate PR. |
|
Agree with @HyukjinKwon to do deprecation first. For the removed ones, we don't really need to keep the config entries for them anymore. We just need the names of removed configs (and the successors) to throw better error messages. |
|
@Ngone51 Record the version when deciding deprecate config, seems good. |
|
Thanks for all the feedbacks..I'll start from the depreaction and alternatives first. |
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
Test build #135666 has finished for PR 31684 at commit
|
|
Test build #135696 has finished for PR 31684 at commit
|
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
What changes were proposed in this pull request?
This pr proposes to add
deprecated()/removed()/alternated()functions toConfigBuilderin order to provide more convenient ways to do these stuff.Why are the changes needed?
Currently, Spark maintains the active configs and deprecated/alternated/removed configs separately,
which is not convenient when developers want to deprecate configs and not good to maintain for the long term.
After this PR, developers can deprecate/alternate/remove a config like this:
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Manually tested.