Skip to content

Commit 14ca918

Browse files
authored
feat(rust): Support BinaryOfsset serde (#22528)
1 parent 1da61c5 commit 14ca918

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/polars-core/src/datatypes/_serde.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ enum SerializableDataType {
9090
Float64,
9191
String,
9292
Binary,
93+
BinaryOffset,
9394
/// A 32-bit date representing the elapsed time since UNIX epoch (1970-01-01)
9495
/// in days (32 bits).
9596
Date,
@@ -136,6 +137,7 @@ impl From<&DataType> for SerializableDataType {
136137
Float64 => Self::Float64,
137138
String => Self::String,
138139
Binary => Self::Binary,
140+
BinaryOffset => Self::BinaryOffset,
139141
Date => Self::Date,
140142
Datetime(tu, tz) => Self::Datetime(*tu, tz.clone()),
141143
Duration(tu) => Self::Duration(*tu),
@@ -171,7 +173,6 @@ impl From<&DataType> for SerializableDataType {
171173
Decimal(precision, scale) => Self::Decimal(*precision, *scale),
172174
#[cfg(feature = "object")]
173175
Object(name) => Self::Object(name.to_string()),
174-
dt => panic!("{dt:?} not supported"),
175176
}
176177
}
177178
}
@@ -193,6 +194,7 @@ impl From<SerializableDataType> for DataType {
193194
Float64 => Self::Float64,
194195
String => Self::String,
195196
Binary => Self::Binary,
197+
BinaryOffset => Self::BinaryOffset,
196198
Date => Self::Date,
197199
Datetime(tu, tz) => Self::Datetime(tu, tz),
198200
Duration(tu) => Self::Duration(tu),

0 commit comments

Comments
 (0)