1818//! This file contains an end to end test of parquet pruning. It writes
1919//! data into a parquet file and then verifies row groups are pruned as
2020//! expected.
21- use std:: sync:: Arc ;
22-
23- use arrow:: array:: { ArrayRef , Int32Array , RecordBatch } ;
24- use arrow_schema:: { DataType , Field , Schema } ;
2521use datafusion:: prelude:: SessionConfig ;
26- use datafusion_common:: { DataFusionError , ScalarValue } ;
22+ use datafusion_common:: ScalarValue ;
2723use itertools:: Itertools ;
2824
2925use crate :: parquet:: Unit :: RowGroup ;
@@ -34,12 +30,12 @@ struct RowGroupPruningTest {
3430 query : String ,
3531 expected_errors : Option < usize > ,
3632 expected_row_group_matched_by_statistics : Option < usize > ,
37- expected_row_group_fully_matched_by_statistics : Option < usize > ,
33+ // expected_row_group_fully_matched_by_statistics: Option<usize>,
3834 expected_row_group_pruned_by_statistics : Option < usize > ,
3935 expected_files_pruned_by_statistics : Option < usize > ,
4036 expected_row_group_matched_by_bloom_filter : Option < usize > ,
4137 expected_row_group_pruned_by_bloom_filter : Option < usize > ,
42- expected_limit_pruned_row_groups : Option < usize > ,
38+ // expected_limit_pruned_row_groups: Option<usize>,
4339 expected_rows : usize ,
4440}
4541impl RowGroupPruningTest {
@@ -51,11 +47,11 @@ impl RowGroupPruningTest {
5147 expected_errors : None ,
5248 expected_row_group_matched_by_statistics : None ,
5349 expected_row_group_pruned_by_statistics : None ,
54- expected_row_group_fully_matched_by_statistics : None ,
50+ // expected_row_group_fully_matched_by_statistics: None,
5551 expected_files_pruned_by_statistics : None ,
5652 expected_row_group_matched_by_bloom_filter : None ,
5753 expected_row_group_pruned_by_bloom_filter : None ,
58- expected_limit_pruned_row_groups : None ,
54+ // expected_limit_pruned_row_groups: None,
5955 expected_rows : 0 ,
6056 }
6157 }
@@ -85,6 +81,7 @@ impl RowGroupPruningTest {
8581 }
8682
8783 // Set the expected fully matched row groups by statistics
84+ /*
8885 fn with_fully_matched_by_stats(
8986 mut self,
9087 fully_matched_by_stats: Option<usize>,
@@ -93,6 +90,12 @@ impl RowGroupPruningTest {
9390 self
9491 }
9592
93+ fn with_limit_pruned_row_groups(mut self, pruned_by_limit: Option<usize>) -> Self {
94+ self.expected_limit_pruned_row_groups = pruned_by_limit;
95+ self
96+ }
97+ */
98+
9699 // Set the expected pruned row groups by statistics
97100 fn with_pruned_by_stats ( mut self , pruned_by_stats : Option < usize > ) -> Self {
98101 self . expected_row_group_pruned_by_statistics = pruned_by_stats;
@@ -116,11 +119,6 @@ impl RowGroupPruningTest {
116119 self
117120 }
118121
119- fn with_limit_pruned_row_groups ( mut self , pruned_by_limit : Option < usize > ) -> Self {
120- self . expected_limit_pruned_row_groups = pruned_by_limit;
121- self
122- }
123-
124122 /// Set the number of expected rows from the output of this test
125123 fn with_expected_rows ( mut self , rows : usize ) -> Self {
126124 self . expected_rows = rows;
@@ -177,6 +175,7 @@ impl RowGroupPruningTest {
177175 }
178176
179177 // Execute the test with the current configuration
178+ /*
180179 async fn test_row_group_prune_with_custom_data(
181180 self,
182181 schema: Arc<Schema>,
@@ -233,6 +232,7 @@ impl RowGroupPruningTest {
233232 output.description(),
234233 );
235234 }
235+ */
236236}
237237
238238#[ tokio:: test]
@@ -1721,6 +1721,7 @@ async fn test_bloom_filter_decimal_dict() {
17211721 . await ;
17221722}
17231723
1724+ /*
17241725// Helper function to create a batch with a single Int32 column.
17251726fn make_i32_batch(
17261727 name: &str,
@@ -1958,3 +1959,4 @@ async fn test_limit_pruning_exceeds_fully_matched() -> datafusion_common::error:
19581959
19591960 Ok(())
19601961}
1962+ */
0 commit comments