Skip to content

Commit

Permalink
Move parquet_schema.rs from sql to parquet tests (#8644)
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb authored Dec 26, 2023
1 parent 4e4d050 commit 78832f1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions datafusion/core/tests/parquet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ mod file_statistics;
mod filter_pushdown;
mod page_pruning;
mod row_group_pruning;
mod schema;
mod schema_coercion;

#[cfg(test)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use ::parquet::arrow::ArrowWriter;
use tempfile::TempDir;

use super::*;
use datafusion_common::assert_batches_sorted_eq;

#[tokio::test]
async fn schema_merge_ignores_metadata_by_default() {
Expand Down Expand Up @@ -90,7 +91,13 @@ async fn schema_merge_ignores_metadata_by_default() {
.await
.unwrap();

let actual = execute_to_batches(&ctx, "SELECT * from t").await;
let actual = ctx
.sql("SELECT * from t")
.await
.unwrap()
.collect()
.await
.unwrap();
assert_batches_sorted_eq!(expected, &actual);
assert_no_metadata(&actual);
}
Expand Down Expand Up @@ -151,7 +158,13 @@ async fn schema_merge_can_preserve_metadata() {
.await
.unwrap();

let actual = execute_to_batches(&ctx, "SELECT * from t").await;
let actual = ctx
.sql("SELECT * from t")
.await
.unwrap()
.collect()
.await
.unwrap();
assert_batches_sorted_eq!(expected, &actual);
assert_metadata(&actual, &expected_metadata);
}
Expand Down
1 change: 0 additions & 1 deletion datafusion/core/tests/sql/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ pub mod expr;
pub mod group_by;
pub mod joins;
pub mod order;
pub mod parquet_schema;
pub mod partitioned_csv;
pub mod predicates;
pub mod references;
Expand Down

0 comments on commit 78832f1

Please sign in to comment.