Skip to content

Commit

Permalink
Add partition pruning tests for all primitive types
Browse files Browse the repository at this point in the history
  • Loading branch information
Blajda committed Mar 5, 2023
1 parent 822a209 commit b019a06
Show file tree
Hide file tree
Showing 2 changed files with 329 additions and 45 deletions.
3 changes: 2 additions & 1 deletion rust/src/writer/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::sync::Arc;
use crate::writer::DeltaWriterError;
use crate::DeltaTableError;

use arrow::array::{as_primitive_array, Array};
use arrow::array::{as_boolean_array, as_primitive_array, Array};
use arrow::datatypes::{
DataType, Int16Type, Int32Type, Int64Type, Int8Type, Schema as ArrowSchema,
SchemaRef as ArrowSchemaRef, UInt16Type, UInt32Type, UInt64Type, UInt8Type,
Expand Down Expand Up @@ -137,6 +137,7 @@ pub(crate) fn stringified_partition_value(
DataType::UInt16 => as_primitive_array::<UInt16Type>(arr).value(0).to_string(),
DataType::UInt32 => as_primitive_array::<UInt32Type>(arr).value(0).to_string(),
DataType::UInt64 => as_primitive_array::<UInt64Type>(arr).value(0).to_string(),
DataType::Boolean => as_boolean_array(arr).value(0).to_string(),
DataType::Utf8 => {
let data = arrow::array::as_string_array(arr);

Expand Down
Loading

0 comments on commit b019a06

Please sign in to comment.