extract operator: add support for week keywords (#436)

This commit is contained in:
Yang Jiang 2022-03-13 03:17:56 +08:00 committed by GitHub
parent 481551c075
commit c688bbb4de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 0 deletions

View file

@ -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,