findepi commented on code in PR #17521:
URL: https://github.com/apache/datafusion/pull/17521#discussion_r2344231059


##########
datafusion/sqllogictest/test_files/push_down_filter.slt:
##########
@@ -395,3 +395,28 @@ order by t1.k, t2.v;
 ----
 1 1 1
 10000000 10000000 10000000
+
+# Regression test for https://github.com/apache/datafusion/issues/17512
+
+query I
+COPY (
+    SELECT arrow_cast('2025-01-01T00:00:00Z'::timestamptz, 
'Timestamp(Microsecond, Some("UTC"))') AS start_timestamp
+)
+TO 'test_files/scratch/push_down_filter/17512.parquet'
+STORED AS PARQUET;
+----
+1
+
+statement ok
+CREATE EXTERNAL TABLE records STORED AS PARQUET LOCATION 
'test_files/scratch/push_down_filter/17512.parquet';
+
+query I
+SELECT 1
+FROM (
+    SELECT start_timestamp
+    FROM records
+    WHERE start_timestamp <= '2025-01-01T00:00:00Z'::timestamptz
+) AS t
+WHERE t.start_timestamp::time < '00:00:01'::time;

Review Comment:
   > > The find_most_restrictive_predicate should operate only on predicates 
comparing column c directly, ignoring those which compare f(c).
   > 
   > That is my understanding of what this PR does. I am not sure if you are 
just confirming this change or if you are proposing / suggesting something more
   
   At the time of writing it was a proposal.
   Now that the proposed change has been applied, it can be read as a 
confirmation.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to