Skip to content

Commit 477e639

Browse files
author
Jan Kaul
committed
fix utf8view issues
1 parent 6e02b4e commit 477e639

File tree

2 files changed

+4
-3
lines changed
  • datafusion_iceberg/src/materialized_view/delta_queries
  • iceberg-rust-spec/src/arrow

2 files changed

+4
-3
lines changed

datafusion_iceberg/src/materialized_view/delta_queries/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mod tests {
99
use std::{sync::Arc, time::Duration};
1010

1111
use datafusion::{
12-
arrow::array::{Float64Array, Int64Array, StringArray},
12+
arrow::array::{Float64Array, Int64Array, StringArray, StringViewArray},
1313
common::tree_node::{TransformedResult, TreeNode},
1414
execution::SessionStateBuilder,
1515
prelude::SessionContext,
@@ -1490,7 +1490,7 @@ GROUP BY
14901490
batch
14911491
.column(0)
14921492
.as_any()
1493-
.downcast_ref::<StringArray>()
1493+
.downcast_ref::<StringViewArray>()
14941494
.unwrap(),
14951495
batch
14961496
.column(1)
@@ -1689,7 +1689,7 @@ GROUP BY
16891689
batch
16901690
.column(0)
16911691
.as_any()
1692-
.downcast_ref::<StringArray>()
1692+
.downcast_ref::<StringViewArray>()
16931693
.unwrap(),
16941694
batch
16951695
.column(1)

iceberg-rust-spec/src/arrow/schema.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ impl TryFrom<&DataType> for Type {
160160
DataType::Time64(_) => Ok(Type::Primitive(PrimitiveType::Time)),
161161
DataType::Timestamp(_, _) => Ok(Type::Primitive(PrimitiveType::Timestamp)),
162162
DataType::Utf8 => Ok(Type::Primitive(PrimitiveType::String)),
163+
DataType::Utf8View => Ok(Type::Primitive(PrimitiveType::String)),
163164
DataType::FixedSizeBinary(len) => {
164165
Ok(Type::Primitive(PrimitiveType::Fixed(*len as u64)))
165166
}

0 commit comments

Comments
 (0)