From 65abaf97de58bfdda6f3703eace1e1045f1792d8 Mon Sep 17 00:00:00 2001 From: Orson Peters Date: Fri, 6 Sep 2024 12:09:55 +0200 Subject: [PATCH] more missing feature flags --- crates/polars-core/src/datatypes/any_value.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/polars-core/src/datatypes/any_value.rs b/crates/polars-core/src/datatypes/any_value.rs index 58cd5a704894..c36c1b628a07 100644 --- a/crates/polars-core/src/datatypes/any_value.rs +++ b/crates/polars-core/src/datatypes/any_value.rs @@ -352,6 +352,7 @@ impl AnyValue<'static> { AnyValue::UInt8(0).cast(dtype), ) }, + #[cfg(feature = "dtype-duration")] DataType::Duration(unit) => AnyValue::Duration(0, *unit), #[cfg(feature="dtype-decimal")] DataType::Decimal(_p, s) => { @@ -841,6 +842,7 @@ impl<'a> AnyValue<'a> { (UInt64(l), UInt64(r)) => UInt64(l + r), (Float32(l), Float32(r)) => Float32(l + r), (Float64(l), Float64(r)) => Float64(l + r), + #[cfg(feature = "dtype-duration")] (Duration(l, lu), Duration(r, ru)) => { if lu != ru { unimplemented!("adding durations with different units is not supported here");