Skip to content

Commit

Permalink
fix: add view scalar extraction
Browse files Browse the repository at this point in the history
Signed-off-by: Ion Koutsouris <15728914+ion-elgreco@users.noreply.github.com>
  • Loading branch information
ion-elgreco committed Jan 2, 2025
1 parent 21efab3 commit 9e35c06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions crates/core/src/kernel/scalars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ impl ScalarExt for Scalar {
.as_any()
.downcast_ref::<LargeStringArray>()
.map(|v| Self::String(v.value(index).to_string())),
Utf8View => arr
.as_any()
.downcast_ref::<StringViewArray>()
.map(|v| Self::String(v.value(index).to_string())),
Boolean => arr
.as_any()
.downcast_ref::<BooleanArray>()
Expand All @@ -122,6 +126,10 @@ impl ScalarExt for Scalar {
.as_any()
.downcast_ref::<FixedSizeBinaryArray>()
.map(|v| Self::Binary(v.value(index).to_vec())),
BinaryView => arr
.as_any()
.downcast_ref::<BinaryViewArray>()
.map(|v| Self::Binary(v.value(index).to_vec())),
Int8 => arr
.as_any()
.downcast_ref::<Int8Array>()
Expand Down Expand Up @@ -217,8 +225,6 @@ impl ScalarExt for Scalar {
| Dictionary(_, _)
| RunEndEncoded(_, _)
| Union(_, _)
| Utf8View
| BinaryView
| ListView(_)
| LargeListView(_)
| Null => None,
Expand Down
2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake-python"
version = "0.23.0"
version = "0.23.1"
authors = ["Qingping Hou <dave2008713@gmail.com>", "Will Jones <willjones127@gmail.com>"]
homepage = "https://github.com/delta-io/delta-rs"
license = "Apache-2.0"
Expand Down

0 comments on commit 9e35c06

Please sign in to comment.