Skip to content
Merged
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
7 changes: 4 additions & 3 deletions vortex-datafusion/src/convert/scalars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ impl TryToDataFusion<ScalarValue> for Scalar {
/// Converts a DataFusion [`ScalarValue`] to a Vortex [`Scalar`], resolving Arrow types through
/// `session`'s [`ArrowSession`](vortex_arrow::ArrowSession).
pub fn scalar_from_df(value: &ScalarValue, session: &VortexSession) -> VortexResult<Scalar> {
let arrow = session.arrow();
Ok(match value {
ScalarValue::Null => Scalar::null(DType::Null),
ScalarValue::Boolean(b) => b
Expand Down Expand Up @@ -241,7 +240,8 @@ pub fn scalar_from_df(value: &ScalarValue, session: &VortexSession) -> VortexRes
ScalarValue::Date32(v)
| ScalarValue::Time32Second(v)
| ScalarValue::Time32Millisecond(v) => {
let dtype = arrow
let dtype = session
.arrow()
.from_arrow_datatype(&value.data_type(), Nullability::Nullable)
.vortex_expect("arrow data type to dtype");
Scalar::try_new(dtype, v.map(vortex::scalar::ScalarValue::from))
Expand All @@ -254,7 +254,8 @@ pub fn scalar_from_df(value: &ScalarValue, session: &VortexSession) -> VortexRes
| ScalarValue::TimestampMillisecond(v, _)
| ScalarValue::TimestampMicrosecond(v, _)
| ScalarValue::TimestampNanosecond(v, _) => {
let dtype = arrow
let dtype = session
.arrow()
.from_arrow_datatype(&value.data_type(), Nullability::Nullable)
.vortex_expect("arrow data type to dtype");
Scalar::try_new(dtype, v.map(vortex::scalar::ScalarValue::from))
Expand Down
Loading