zhuqi-lucas commented on code in PR #27079:
URL: https://github.com/apache/datafusion/pull/27079#discussion_r4520427156


##########
datafusion/datasource/src/file_scan_config/mod.rs:
##########
@@ -1074,6 +1077,15 @@ impl DataSource for FileScanConfig {
         filters: Vec<Arc<dyn PhysicalExpr>>,
         config: &ConfigOptions,
     ) -> Result<FilterPushdownPropagation<Arc<dyn DataSource>>> {
+        // The scan applies its limit after any filter it holds, so a filter
+        // from above the limit would let through rows the limit should have
+        // cut.
+        if self.limit.is_some() {

Review Comment:
   Done in 71beb85ba: the two scan checks and 
`sort_pushdown_with_limit_unsupported` are replaced by your rule-level check. 
The full sqllogictest suite passes, and the two `filter_pushdown.rs` snapshots 
now keep the filters separate (I renamed those tests to match). The three 
queries from #27194 are test 16 in the slt with the option off.
   



-- 
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