kasakrisz commented on code in PR #3807:
URL: https://github.com/apache/hive/pull/3807#discussion_r1033745618
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/parser/Filter.g:
##########
@@ -141,7 +141,11 @@ binOpExpression
(
(key = Identifier op = operator value = DateLiteral)
|
+ (key = Identifier op = operator keyword = KW_DATE value =
StringLiteral)
+ |
Review Comment:
Seems that DateLiteral supports optional `date` keyword prefix but does not
support quotes:
https://github.com/apache/hive/blob/2fb969c6c6c7ebc9d2c34e27152c147aa34d7ff9/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/parser/Filter.g#L464-L467
How about improve `DateString` by adding a quoted alternative
```
fragment DateString
:
'\'' (Digit)(Digit)(Digit)(Digit) '-' (Digit)(Digit) '-' (Digit)(Digit)
'\''
| (Digit)(Digit)(Digit)(Digit) '-' (Digit)(Digit) '-' (Digit)(Digit)
;
```
instead of adding these alternatives to all occurrences where `DateLiteral`
is referenced.
Btw I don't know why `DateString` requires quotes in the first place since
`StringLiteral` has
--
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]