MaxGekk commented on a change in pull request #25716: [SPARK-29012][SQL] 
Support special timestamp values
URL: https://github.com/apache/spark/pull/25716#discussion_r322593445
 
 

 ##########
 File path: 
sql/core/src/test/resources/sql-tests/results/pgSQL/timestamp.sql.out
 ##########
 @@ -11,171 +11,265 @@ struct<>
 
 
 -- !query 1
-INSERT INTO TIMESTAMP_TBL VALUES ('1997-01-02')
+INSERT INTO TIMESTAMP_TBL VALUES ('now')
 -- !query 1 schema
 struct<>
 -- !query 1 output
 
 
 
 -- !query 2
-INSERT INTO TIMESTAMP_TBL VALUES ('1997-01-02 03:04:05')
+INSERT INTO TIMESTAMP_TBL VALUES ('now')
 -- !query 2 schema
 struct<>
 -- !query 2 output
 
 
 
 -- !query 3
-INSERT INTO TIMESTAMP_TBL VALUES ('1997-02-10 17:32:01-08')
+INSERT INTO TIMESTAMP_TBL VALUES ('today')
 -- !query 3 schema
 struct<>
 -- !query 3 output
 
 
 
 -- !query 4
-INSERT INTO TIMESTAMP_TBL VALUES ('2001-09-22T18:19:20')
+INSERT INTO TIMESTAMP_TBL VALUES ('yesterday')
 -- !query 4 schema
 struct<>
 -- !query 4 output
 
 
 
 -- !query 5
-SELECT '' AS `64`, d1 FROM TIMESTAMP_TBL
+INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow')
 -- !query 5 schema
-struct<64:string,d1:timestamp>
+struct<>
 -- !query 5 output
+
+
+
+-- !query 6
+INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow EST')
+-- !query 6 schema
+struct<>
+-- !query 6 output
+
+
+
+-- !query 7
+SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp 'today'
+-- !query 7 schema
+struct<One:bigint>
+-- !query 7 output
+1
+
+
+-- !query 8
+SELECT count(*) AS Three FROM TIMESTAMP_TBL WHERE d1 = timestamp 'tomorrow'
+-- !query 8 schema
+struct<Three:bigint>
+-- !query 8 output
+2
+
+
+-- !query 9
+SELECT count(*) AS One FROM TIMESTAMP_TBL WHERE d1 = timestamp 'yesterday'
+-- !query 9 schema
+struct<One:bigint>
+-- !query 9 output
+1
+
+
+-- !query 10
+TRUNCATE TABLE TIMESTAMP_TBL
+-- !query 10 schema
+struct<>
+-- !query 10 output
+
+
+
+-- !query 11
+INSERT INTO TIMESTAMP_TBL VALUES ('epoch')
+-- !query 11 schema
+struct<>
+-- !query 11 output
+
+
+
+-- !query 12
+INSERT INTO TIMESTAMP_TBL VALUES ('1997-01-02')
+-- !query 12 schema
+struct<>
+-- !query 12 output
+
+
+
+-- !query 13
+INSERT INTO TIMESTAMP_TBL VALUES ('1997-01-02 03:04:05')
+-- !query 13 schema
+struct<>
+-- !query 13 output
+
+
+
+-- !query 14
+INSERT INTO TIMESTAMP_TBL VALUES ('1997-02-10 17:32:01-08')
+-- !query 14 schema
+struct<>
+-- !query 14 output
+
+
+
+-- !query 15
+INSERT INTO TIMESTAMP_TBL VALUES ('2001-09-22T18:19:20')
+-- !query 15 schema
+struct<>
+-- !query 15 output
+
+
+
+-- !query 16
+SELECT '' AS `64`, d1 FROM TIMESTAMP_TBL
+-- !query 16 schema
+struct<64:string,d1:timestamp>
+-- !query 16 output
+       1969-12-31 16:00:00
 
 Review comment:
   I can set `UTC` globally but ... if we know the reason of this, should we do 
that?

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