NoahKusaba commented on code in PR #111:
URL: 
https://github.com/apache/datafusion-iceberg/pull/111#discussion_r4608750703


##########
crates/datafusion/tests/limit_pushdown.rs:
##########
@@ -103,6 +103,30 @@ mod tests {
         Ok(())
     }
 
+    #[tokio::test]
+    async fn reports_the_rows_returned_by_a_limited_iceberg_scan() -> 
Result<()> {
+        let harness = IcebergTestHarness::new().await?;
+        // Only row counts, so the output doesn't vary between runs.
+        harness
+            .query("SET datafusion.explain.analyze_categories = 'rows'")
+            .await?;
+        let (_, explain) = harness
+            .query("EXPLAIN ANALYZE SELECT pickup_date FROM taxi LIMIT 3")
+            .await?;
+
+        insta::assert_snapshot!(explain, @r"
+    
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
+    | plan_type         | plan                                                 
                                                                           |
+    
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
+    | Plan with Metrics | CooperativeExec, metrics=[]                          
                                                                           |
+    |                   |   DataSourceExec: format=iceberg, 
projection=[pickup_date], fetch=3, metrics=[output_rows=3, output_batches=1, 
batches_split=0] |
+    |                   |                                                      
                                                                           |
+    
+-------------------+---------------------------------------------------------------------------------------------------------------------------------+
+    ");
+
+        Ok(())
+    }

Review Comment:
   Good suggestion, added it. :smile: 



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