wangyum commented on issue #25114: [SPARK-28349][SQL] Add FALSE and SETMINUS to 
ansiNonReserved
URL: https://github.com/apache/spark/pull/25114#issuecomment-512229758
 
 
   ```sql
   spark-sql> set spark.sql.parser.ansi.enabled=true;
   spark.sql.parser.ansi.enabled        true
   spark-sql> select extract(year from timestamp '2001-02-16 20:38:40')  ;
   Error in query:
   no viable alternative at input 'year'(line 1, pos 15)
   
   == SQL ==
   select extract(year from timestamp '2001-02-16 20:38:40')
   ---------------^^^
   
   spark-sql> set spark.sql.parser.ansi.enabled=false;
   spark.sql.parser.ansi.enabled        false
   spark-sql> select extract(year from timestamp '2001-02-16 20:38:40')  ;
   2001
   ```
   Do we need to add `YEAR`, `MONTH`, `DAY` , `HOUR`, `MINUTE` and `SECOND` to 
ansiNonReserved? These are all non-reserved for PostgreSQL and Oracle.
   
   
https://github.com/antlr/grammars-v4/blob/b7f5b6d8c4da4d45d3dcb8146df310b89cd58114/plsql/PlSqlParser.g4#L4959-L6703
   
   

----------------------------------------------------------------
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]

Reply via email to