Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions vortex-datafusion/tests/schema_evolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use datafusion::datasource::listing::ListingTableConfig;
use datafusion::execution::SessionStateBuilder;
use datafusion::execution::context::SessionContext;
use datafusion_common::assert_batches_eq;
use datafusion_common::assert_batches_sorted_eq;
use datafusion_common::create_array;
use datafusion_common::record_batch;
use datafusion_datasource::ListingTableUrl;
Expand Down Expand Up @@ -149,11 +150,11 @@ async fn test_filter_with_schema_evolution() {
"| a | b |",
"+-------+---+",
"| one | |",
"| two | |",
"| three | |",
"| two | |",
"+-------+---+",
];
assert_batches_eq!(expected, &result);
assert_batches_sorted_eq!(expected, &result);
}

#[tokio::test]
Expand Down Expand Up @@ -246,14 +247,14 @@ async fn test_filter_schema_evolution_order() {

// a field: present in both files
// b field: only present in file2, file1 fills with nulls
assert_batches_eq!(
assert_batches_sorted_eq!(
&[
"+---+------+",
"| a | b |",
"+---+------+",
"| 3 | |",
"| 5 | |",
"| 4 | four |",
"| 5 | |",
"| 6 | six |",
"+---+------+",
],
Expand Down Expand Up @@ -351,7 +352,7 @@ async fn test_filter_schema_evolution_struct_fields() {
// Scan all the records, NULLs are filled in for nested optional fields.
let full_scan = df.collect().await.unwrap();

assert_batches_eq!(
assert_batches_sorted_eq!(
&[
"+--------------+-----------------------------+",
"| hostname | payload |",
Expand Down Expand Up @@ -385,7 +386,7 @@ async fn test_filter_schema_evolution_struct_fields() {
.await
.unwrap();

assert_batches_eq!(
assert_batches_sorted_eq!(
&[
"+--------------+-----------------------------+",
"| hostname | payload |",
Expand Down
4 changes: 2 additions & 2 deletions vortex-scan/src/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ mod tests {
use vortex_error::VortexResult;

use super::*;
use crate::test::SESSION;
use crate::test::SCAN_SESSION;

fn create_test_struct_array() -> VortexResult<ArrayRef> {
// Create Arrow arrays
Expand Down Expand Up @@ -166,7 +166,7 @@ mod tests {
let vortex_array = create_test_struct_array()?;
let schema = create_arrow_schema();
let data_type = DataType::Struct(schema.fields().clone());
let mut ctx = SESSION.create_execution_ctx();
let mut ctx = SCAN_SESSION.create_execution_ctx();

let batch = to_record_batch(vortex_array, &data_type, &mut ctx)?;
assert_eq!(batch.num_columns(), 2);
Expand Down
Loading