cloud-fan commented on a change in pull request #33115: URL: https://github.com/apache/spark/pull/33115#discussion_r659859920
########## File path: sql/core/src/test/resources/sql-tests/inputs/datetime.sql ########## @@ -78,6 +78,16 @@ select timestamp'2019-10-06 10:11:12.345678' - date'2020-01-01'; select timestamp'2019-10-06 10:11:12.345678' - null; select null - timestamp'2019-10-06 10:11:12.345678'; +-- subtract timestamps without time zone +select date'2020-01-01' - to_timestamp_ntz('2019-10-06 10:11:12.345678'); +select to_timestamp_ntz('2019-10-06 10:11:12.345678') - date'2020-01-01'; +select to_timestamp_ntz('2019-10-06 10:11:12.345678') - null; +select null - to_timestamp_ntz('2019-10-06 10:11:12.345678'); +select to_timestamp_ntz('2019-10-07 10:11:12.345678') - to_timestamp_ntz('2019-10-06 10:11:12.345677'); +select to_timestamp_ntz('2019-10-06 10:11:12.345677') - to_timestamp_ntz('2019-10-07 10:11:12.345678'); +select to_timestamp_ntz('2019-10-07 10:11:12.345678') - timestamp'2019-10-06 10:11:12.345678'; +select timestamp'2019-10-06 10:11:12.345678' - to_timestamp_ntz('2019-10-07 10:11:12.345678'); Review comment: let's use `to_timestamp` in the test, in case we make `timestamp'xxx'` return TIMESTAMP NTZ later. -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org