alamb commented on code in PR #9888:
URL: https://github.com/apache/arrow-datafusion/pull/9888#discussion_r1545625993


##########
datafusion/core/tests/parquet/page_pruning.rs:
##########
@@ -515,6 +515,120 @@ int_tests!(16);
 int_tests!(32);
 int_tests!(64);
 
+macro_rules! uint_tests {
+    ($bits:expr) => {
+        paste::item! {
+            #[tokio::test]
+            //                      null count  min                            
           max
+            // page-0                         0  0                             
            4

Review Comment:
   I was confused at first, but the `make_uint_batches(0, 5)` returns `0..5` 
which has a max of 4. ✅ 



##########
datafusion/core/tests/parquet/page_pruning.rs:
##########
@@ -515,6 +515,120 @@ int_tests!(16);
 int_tests!(32);
 int_tests!(64);
 
+macro_rules! uint_tests {
+    ($bits:expr) => {
+        paste::item! {
+            #[tokio::test]
+            //                      null count  min                            
           max
+            // page-0                         0  0                             
            4
+            // page-1                         0  1                             
            5
+            // page-2                         0  5                             
            9
+            // page-3                         0  250                           
            254
+            async fn [<prune_uint $bits _lt>]() {
+                test_prune(
+                    Scenario::UInt,
+                    &format!("SELECT * FROM t where u{} < 6", $bits),
+                    Some(0),
+                    Some(5),
+                    11,
+                )
+                .await;
+            }
+
+            #[tokio::test]
+            async fn [<prune_uint $bits _gt >]() {
+                test_prune(
+                    Scenario::UInt,
+                    &format!("SELECT * FROM t where u{} > 253", $bits),
+                    Some(0),
+                    Some(15),
+                    1,
+                )
+                .await;
+            }
+
+            #[tokio::test]
+            async fn [<prune_uint $bits _eq >]() {
+                test_prune(
+                    Scenario::UInt,
+                    &format!("SELECT * FROM t where u{} = 6", $bits),
+                    Some(0),
+                    Some(15),
+                    1,
+                )
+                .await;
+            }
+
+            #[tokio::test]
+            async fn [<prune_uint $bits _scalar_fun_and_eq >]() {
+                test_prune(
+                    Scenario::UInt,
+                    &format!("SELECT * FROM t where power(u{}, 2) = 36 and u{} 
= 6", $bits, $bits),
+                    Some(0),
+                    Some(15),
+                    1,
+                )
+                .await;
+            }
+
+            #[tokio::test]
+            async fn [<prune_uint $bits _scalar_fun >]() {
+                test_prune(
+                    Scenario::UInt,
+                    &format!("SELECT * FROM t where power(u{}, 2) = 25", 
$bits),
+                    Some(0),
+                    Some(0),
+                    2,
+                )
+                .await;
+            }

Review Comment:
   makes sense to me



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

Reply via email to