cloud-fan commented on code in PR #56969:
URL: https://github.com/apache/spark/pull/56969#discussion_r3826616677


##########
sql/core/src/test/resources/sql-tests/inputs/timestamp-ntz.sql:
##########
@@ -36,6 +36,14 @@ select timestampdiff(HOUR, timestamp_ntz'2022-02-14 
01:02:03', timestamp_ltz'202
 select timestampdiff(YEAR, date'2022-02-15', timestamp_ntz'2023-02-15 
10:11:12');
 select timestampdiff(MILLISECOND, timestamp_ntz'2022-02-14 23:59:59.123', 
date'2022-02-15');
 
+-- SPARK-57819: months_between derives its time zone from the first operand's 
family, mirroring
+-- the existing `timestamp - timestamp` convention: TIMESTAMP_NTZ is evaluated 
in UTC and
+-- TIMESTAMP_LTZ in the session time zone. A same-family pair is therefore 
zone-independent,

Review Comment:
   **Nit:**
   
   Only an NTZ/NTZ pair is zone-independent; LTZ/LTZ still uses the session 
zone, so the current universal claim is false.
   
   ```suggestion
   -- TIMESTAMP_LTZ in the session time zone. An NTZ/NTZ pair is therefore 
zone-independent,
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to