MaxGekk commented on a change in pull request #25336: [SPARK-28017][SQL] 
Support additional levels of truncations by DATE_TRUNC/TRUNC
URL: https://github.com/apache/spark/pull/25336#discussion_r310110759
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/results/pgSQL/date.sql.out
 ##########
 @@ -508,48 +508,128 @@ struct<Days From 2K:int>
 
 
 -- !query 47
-select make_date(2013, 7, 15)
+SELECT DATE_TRUNC('MILLENNIUM', TIMESTAMP '1970-03-20 04:30:00.00000')
 -- !query 47 schema
-struct<make_date(2013, 7, 15):date>
+struct<date_trunc(MILLENNIUM, TIMESTAMP('1970-03-20 04:30:00')):timestamp>
 -- !query 47 output
-2013-07-15
+1001-01-01 00:07:02
 
 Review comment:
   Non-zero time of `07:02` is due to incompatibility in calculations of time 
zone offsets by old API `java.sql.Date` and new one from Java 8 time API, see 
https://bugs.openjdk.java.net/browse/JDK-6281408.
   
   To get correct result, set `spark.sql.datetime.java8API.enabled` to `true`.

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