cloud-fan commented on a change in pull request #26584: [SPARK-29951][SQL] Make
the behavior of Postgre dialect independent of ansi mode config
URL: https://github.com/apache/spark/pull/26584#discussion_r347939499
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -788,7 +788,7 @@ booleanValue
interval
: negativeSign=MINUS? INTERVAL (errorCapturingMultiUnitsInterval |
errorCapturingUnitToUnitInterval)?
- | {ansi}? (errorCapturingMultiUnitsInterval |
errorCapturingUnitToUnitInterval)
+ | {use_SQL_standard_keywords}? (errorCapturingMultiUnitsInterval |
errorCapturingUnitToUnitInterval)
Review comment:
@maropu maybe we should have a separated config to allow not specifying the
leading INTERVAL. pgsql requires the leading INTERVAL
```
cloud0fan=# select interval '1' day;
interval
----------
1 day
(1 row)
cloud0fan=# select '1' day;
ERROR: syntax error at or near "day"
LINE 1: select '1' day;
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]