mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-19 05:30:19 +00:00
extract operator: add support for week keywords (#436)
This commit is contained in:
parent
481551c075
commit
c688bbb4de
4 changed files with 6 additions and 0 deletions
|
@ -909,6 +909,7 @@ impl<'a> Parser<'a> {
|
|||
Token::Word(w) => match w.keyword {
|
||||
Keyword::YEAR => Ok(DateTimeField::Year),
|
||||
Keyword::MONTH => Ok(DateTimeField::Month),
|
||||
Keyword::WEEK => Ok(DateTimeField::Week),
|
||||
Keyword::DAY => Ok(DateTimeField::Day),
|
||||
Keyword::HOUR => Ok(DateTimeField::Hour),
|
||||
Keyword::MINUTE => Ok(DateTimeField::Minute),
|
||||
|
@ -966,6 +967,7 @@ impl<'a> Parser<'a> {
|
|||
if [
|
||||
Keyword::YEAR,
|
||||
Keyword::MONTH,
|
||||
Keyword::WEEK,
|
||||
Keyword::DAY,
|
||||
Keyword::HOUR,
|
||||
Keyword::MINUTE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue