2010YOUY01 commented on code in PR #18408:
URL: https://github.com/apache/datafusion/pull/18408#discussion_r2533042538
##########
datafusion/core/src/execution/context/mod.rs:
##########
Review Comment:
```suggestion
_ => return plan_err!("Unknown runtime configuration:
{variable}"),
// Remember to update `reset_runtime_variable()` when adding new
options
```
##########
datafusion/sql/src/statement.rs:
##########
@@ -1937,6 +1938,25 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
}
}
+ fn reset_statement_to_plan(&self, statement: ResetStatement) ->
Result<LogicalPlan> {
+ match statement {
+ ResetStatement::Variable(variable) => {
+ let variable = object_name_to_string(&variable);
+ let mut variable_lower = variable.to_lowercase();
+
+ if variable_lower == "timezone" || variable_lower ==
"time.zone" {
Review Comment:
Could you add some comment to explain this special case?
##########
datafusion/sql/src/parser.rs:
##########
@@ -722,6 +744,47 @@ impl<'a> DFParser<'a> {
}))
}
+ /// Parse a SQL `RESET`
+ pub fn parse_reset(&mut self) -> Result<Statement, DataFusionError> {
Review Comment:
Just curious -- why for certain statements we decide to implement in-house
parsing, instead of using `sqlparser` dependency?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]