mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
add set time zone sometimezone as a exception while parsing keyword::set (#727)
* add set time zone sometimezone as a exception while parsing keyword::set * remove redundant parentheses * add Statement::SetTimeZone * delete useless comments
This commit is contained in:
parent
10652b61b4
commit
bae682255d
3 changed files with 32 additions and 0 deletions
|
@ -4979,6 +4979,17 @@ fn parse_set_time_zone() {
|
|||
one_statement_parses_to("SET TIME ZONE TO 'UTC'", "SET TIMEZONE = 'UTC'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_set_time_zone_alias() {
|
||||
match verified_stmt("SET TIME ZONE 'UTC'") {
|
||||
Statement::SetTimeZone { local, value } => {
|
||||
assert!(!local);
|
||||
assert_eq!(value, Expr::Value(Value::SingleQuotedString("UTC".into())));
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_commit() {
|
||||
match verified_stmt("COMMIT") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue