kosiew commented on code in PR #25240: URL: https://github.com/apache/datafusion/pull/25240#discussion_r4103232332
########## datafusion/sqllogictest/test_files/datetime/timestamps.slt: ########## @@ -1980,6 +1980,44 @@ SELECT '2000-01-01T00:00:00'::timestamp - '2010-01-01T00:00:00'::timestamp; ---- -3653 days 0 hours 0 mins 0.000000000 secs +# Subtracting a timezone-naive timestamp from a timezone-aware one reads the +# naive operand in the aware operand's time zone at every time unit, as `=` +# does. At equal units arrow can subtract the raw values directly, which used to +# skip coercion and read the naive operand as UTC, so the answer depended on the +# time unit of the aware operand. +statement ok +CREATE TABLE mixed_tz_minus AS SELECT Review Comment: This SQL test covers nanoseconds and milliseconds, but the comment says the fix applies at every time unit. Could you add aware timestamps in seconds and microseconds, with subtraction checks, to cover all four units? -- 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]
