You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2024/03/24 18:34:34 UTC

Re: [PR] parquet: Add tests for pruning on Int8/Int16/Int64 columns [arrow-datafusion]

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


##########
datafusion/core/tests/parquet/row_group_pruning.rs:
##########
@@ -285,105 +285,187 @@ async fn prune_disabled() {
     );
 }
 
-#[tokio::test]
-async fn prune_int32_lt() {
-    RowGroupPruningTest::new()
-        .with_scenario(Scenario::Int32)
-        .with_query("SELECT * FROM t where i < 1")
-        .with_expected_errors(Some(0))
-        .with_matched_by_stats(Some(3))
-        .with_pruned_by_stats(Some(1))
-        .with_matched_by_bloom_filter(Some(0))
-        .with_pruned_by_bloom_filter(Some(0))
-        .with_expected_rows(11)
-        .test_row_group_prune()
-        .await;
-
-    // result of sql "SELECT * FROM t where i < 1" is same as
-    // "SELECT * FROM t where -i > -1"
-    RowGroupPruningTest::new()
-        .with_scenario(Scenario::Int32)
-        .with_query("SELECT * FROM t where -i > -1")
-        .with_expected_errors(Some(0))
-        .with_matched_by_stats(Some(3))
-        .with_pruned_by_stats(Some(1))
-        .with_matched_by_bloom_filter(Some(0))
-        .with_pruned_by_bloom_filter(Some(0))
-        .with_expected_rows(11)
-        .test_row_group_prune()
-        .await;
-}
-
-#[tokio::test]
-async fn prune_int32_eq() {
-    RowGroupPruningTest::new()
-        .with_scenario(Scenario::Int32)
-        .with_query("SELECT * FROM t where i = 1")
-        .with_expected_errors(Some(0))
-        .with_matched_by_stats(Some(1))
-        .with_pruned_by_stats(Some(3))
-        .with_matched_by_bloom_filter(Some(1))
-        .with_pruned_by_bloom_filter(Some(0))
-        .with_expected_rows(1)
-        .test_row_group_prune()
-        .await;
-}
-#[tokio::test]
-async fn prune_int32_scalar_fun_and_eq() {
-    RowGroupPruningTest::new()
-        .with_scenario(Scenario::Int32)
-        .with_query("SELECT * FROM t where i = 1")
-        .with_expected_errors(Some(0))
-        .with_matched_by_stats(Some(1))
-        .with_pruned_by_stats(Some(3))
-        .with_matched_by_bloom_filter(Some(1))
-        .with_pruned_by_bloom_filter(Some(0))
-        .with_expected_rows(1)
-        .test_row_group_prune()
-        .await;
-}
-
-#[tokio::test]
-async fn prune_int32_scalar_fun() {
-    RowGroupPruningTest::new()
-        .with_scenario(Scenario::Int32)
-        .with_query("SELECT * FROM t where abs(i) = 1")
-        .with_expected_errors(Some(0))
-        .with_matched_by_stats(Some(0))
-        .with_pruned_by_stats(Some(0))
-        .with_matched_by_bloom_filter(Some(0))
-        .with_pruned_by_bloom_filter(Some(0))
-        .with_expected_rows(3)
-        .test_row_group_prune()
-        .await;
+macro_rules! int_tests {
+    ($bits:expr, correct_bloom_filters: $correct_bloom_filters:expr) => {

Review Comment:
   It would be nice to add documentation about what these parameters mean, especially correct_bloom_filters



-- 
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-unsubscribe@arrow.apache.org

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