Skip to content

Commit ebc279c

Browse files
authored
Consolidate ParquetExec tests in parquet_exec integration test (#4130)
* Consolidate `ParquetExec` tests in `parquet_exec` integration test * improve comment
1 parent 175adbd commit ebc279c

File tree

10 files changed

+46
-4
lines changed

10 files changed

+46
-4
lines changed

datafusion/core/src/physical_plan/file_format/parquet.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,8 @@ pub async fn plan_to_parquet(
900900

901901
#[cfg(test)]
902902
mod tests {
903+
// See also `parquet_exec` integration test
904+
903905
use super::*;
904906
use crate::config::ConfigOptions;
905907
use crate::datasource::file_format::parquet::test_util::store_parquet;

datafusion/core/tests/parquet_filter_pushdown.rs renamed to datafusion/core/tests/parquet/filter_pushdown.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ async fn single_file_small_data_pages() {
272272

273273
// TestCase::new(&test_parquet_file)
274274
// .with_name("selective")
275-
// // predicagte is chosen carefully to prune pages 0, 1, 2, 3, 4
275+
// // predicate is chosen carefully to prune pages 0, 1, 2, 3, 4
276276
// // pod = 'iadnalqpdzthpifrvewossmpqibgtsuin'
277277
// .with_filter(col("pod").eq(lit("iadnalqpdzthpifrvewossmpqibgtsuin")))
278278
// .with_pushdown_expected(PushdownExpected::Some)
@@ -291,7 +291,7 @@ async fn single_file_small_data_pages() {
291291
// page 5: DLE:RLE RLE:RLE VLE:RLE_DICTIONARY ST:[min: 1970-01-01T00:00:00.000000000, max: 1970-01-01T00:00:00.005330944, num_nulls not defined] CRC:[none] SZ:12601 VC:7739
292292
TestCase::new(&test_parquet_file)
293293
.with_name("selective")
294-
// predicagte is chosen carefully to prune pages
294+
// predicate is chosen carefully to prune pages 1, 2, 4, and 5
295295
// time > 1970-01-01T00:00:00.004300000
296296
.with_filter(col("time").gt(lit_timestamp_nano(4300000)))
297297
.with_pushdown_expected(PushdownExpected::Some)

datafusion/core/tests/parquet/mod.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
//! Parquet integration tests
19+
mod filter_pushdown;
20+
mod page_pruning;
21+
mod row_group_pruning;

datafusion/core/tests/parquet_exec.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
/// Run all tests that are found in the `parquet` directory
19+
mod parquet;

datafusion/core/tests/sql/order.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ async fn sort_empty() -> Result<()> {
214214
#[tokio::test]
215215
async fn sort_with_lots_of_repetition_values() -> Result<()> {
216216
let ctx = SessionContext::new();
217-
let filename = "tests/parquet/repeat_much.snappy.parquet";
217+
let filename = "tests/parquet/data/repeat_much.snappy.parquet";
218218

219219
ctx.register_parquet("rep", filename, ParquetReadOptions::default())
220220
.await?;

datafusion/core/tests/sql/parquet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async fn fixed_size_binary_columns() {
5353
let ctx = SessionContext::new();
5454
ctx.register_parquet(
5555
"t0",
56-
"tests/parquet/test_binary.parquet",
56+
"tests/parquet/data/test_binary.parquet",
5757
ParquetReadOptions::default(),
5858
)
5959
.await

0 commit comments

Comments
 (0)