-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: add RESET statement for configuration variabless #18408
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thank you for submitting this PR, I've left a few comments
| self.return_empty_dataframe() | ||
| } | ||
|
|
||
| async fn reset_variable(&self, stmt: ResetVariable) -> Result<DataFrame> { |
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.
Seems odd to always return an empty dataframe in this function. Is that really necessary vs Result<()> ?
| } | ||
|
|
||
| /// Reset a configuration option back to its default value | ||
| pub fn reset(&mut self, key: &str) -> Result<()> { |
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.
I think overall it might be better to add a reset fn to ConfigField and update the config_namespace! macro rather than implement it like this. Just my opinion..
|
One additional thing - I didn't see anything in this PR for the unparser. It's possible that the set/unset isn't supported (and/or shouldn't be supported) there but could you take a look and see? |
9a18356 to
9cbfb17
Compare
@Omega359 Thanks for flagging it. I double-checked the unparser: today it simply funnels |
be08bf3 to
645e40b
Compare
645e40b to
38a27d5
Compare
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?