Copilot commented on code in PR #25094: URL: https://github.com/apache/datafusion/pull/25094#discussion_r3964692708
########## datafusion/sqllogictest/test_files/datetime/timestamps.slt: ########## @@ -1980,6 +1980,49 @@ SELECT '2000-01-01T00:00:00'::timestamp - '2010-01-01T00:00:00'::timestamp; ---- -3653 days 0 hours 0 mins 0.000000000 secs +# Regression test for https://github.com/apache/datafusion/issues/13212 +statement ok +SET TIME ZONE = '+08' + +query ??? +WITH timestamps(ts_tz, ts) AS ( + VALUES ('2024-11-01T00:00:00+00:00'::timestamptz, '2024-11-01T00:00:00'::timestamp) +) +SELECT + '2024-11-01T00:00:00+00:00'::timestamptz - '2024-11-01T00:00:00'::timestamp, + ts_tz - ts, + ts - ts_tz +FROM timestamps; +---- +0 days 8 hours 0 mins 0.000000000 secs 0 days 8 hours 0 mins 0.000000000 secs 0 days -8 hours 0 mins 0.000000000 secs Review Comment: The testing strategy says nested subqueries are covered, but this CTE only supplies input rows; every subtraction is still evaluated in the outer projection. The new recursive `analyze_internal` propagation could therefore regress without failing this test. Add a scalar-subquery expression so that path is actually exercised. -- 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]
