cloud-fan commented on a change in pull request #26412: [SPARK-29774][SQL] Date 
and Timestamp type +/- null should be null as Postgres
URL: https://github.com/apache/spark/pull/26412#discussion_r354158478
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/results/datetime.sql.out
 ##########
 @@ -100,64 +100,294 @@ struct<year(CAST(1500-01-01 AS 
DATE)):int,month(CAST(1500-01-01 AS DATE)):int,da
 
 
 -- !query 11
-select date '2001-09-28' + 7
+select date '2019-01-01\t'
 -- !query 11 schema
-struct<date_add(DATE '2001-09-28', 7):date>
+struct<DATE '2019-01-01':date>
 -- !query 11 output
-2001-10-05
+2019-01-01
 
 
 -- !query 12
-select 7 + date '2001-09-28'
+select timestamp '2019-01-01\t'
 -- !query 12 schema
-struct<date_add(DATE '2001-09-28', 7):date>
+struct<TIMESTAMP '2019-01-01 00:00:00':timestamp>
 -- !query 12 output
-2001-10-05
+2019-01-01 00:00:00
 
 
 -- !query 13
-select date '2001-10-01' - 7
+select timestamp'2011-11-11 11:11:11' + interval '2' day
 -- !query 13 schema
-struct<date_sub(DATE '2001-10-01', 7):date>
+struct<CAST(TIMESTAMP '2011-11-11 11:11:11' + INTERVAL '2 days' AS 
TIMESTAMP):timestamp>
 
 Review comment:
   can we avoid adding cast if not necessary?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to