Skip to content

Conversation

@Weijun-H
Copy link
Member

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?

@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) common Related to common crate labels Oct 31, 2025
Copy link
Contributor

@Omega359 Omega359 left a 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> {
Copy link
Contributor

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<()> {
Copy link
Contributor

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..

@Omega359
Copy link
Contributor

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?

@Weijun-H
Copy link
Member Author

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?

@Omega359 Thanks for flagging it. I double-checked the unparser: today it simply funnels LogicalPlan::Statement through the query path, so SET/RESET plans aren’t rendered back to SQL. Supporting them would also need upstream sqlparser changes, as the AST has no native RESET node. Leaving it out of this PR was intentional given those constraints.

@Weijun-H Weijun-H force-pushed the 18384-reset-config branch 2 times, most recently from be08bf3 to 645e40b Compare October 31, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate core Core DataFusion crate logical-expr Logical plan and expressions sql SQL Planner sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support resetting config options to defaults

2 participants