MaxGekk commented on issue #25410: [SPARK-28690][SQL] Add `date_part` function 
for timestamps/dates
URL: https://github.com/apache/spark/pull/25410#issuecomment-524002797
 
 
   @dongjoon-hyun @maropu When I set `spark.sql.parser.ansi.enabled` to `false` 
there: 
https://github.com/apache/spark/blob/97dc4c0bfc3a15d364a376c6f87cb921d8d6980d/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala#L302
   it accepts `year` without backquotes as well:
   ```
   -- !query 2
   SELECT date_part( 'year', d1) AS year FROM TIMESTAMP_TBL WHERE d1 BETWEEN 
'1902-01-01' AND '2038-01-01'
   -- !query 2 schema
   struct<year:int>
   -- !query 2 output
   1997
   ```

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