From f99263552906b5b9fb22d679cb466876057d95e9 Mon Sep 17 00:00:00 2001 From: Mikhail Cheshkov Date: Tue, 16 Jul 2024 17:46:45 +0300 Subject: [PATCH] refactor: Use make_value for interval in to_day_interval and to_month_interval --- .../physical-expr/src/datetime_expressions.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/datafusion/physical-expr/src/datetime_expressions.rs b/datafusion/physical-expr/src/datetime_expressions.rs index 3857aff8eac4..0b2190d00785 100644 --- a/datafusion/physical-expr/src/datetime_expressions.rs +++ b/datafusion/physical-expr/src/datetime_expressions.rs @@ -25,8 +25,8 @@ use arrow::{ array::{Array, ArrayRef, GenericStringArray, PrimitiveArray, StringOffsetSizeTrait}, compute::kernels::cast_utils::string_to_timestamp_nanos, datatypes::{ - ArrowPrimitiveType, DataType, TimestampMicrosecondType, TimestampMillisecondType, - TimestampNanosecondType, TimestampSecondType, + ArrowPrimitiveType, DataType, IntervalDayTimeType, TimestampMicrosecondType, + TimestampMillisecondType, TimestampNanosecondType, TimestampSecondType, }, }; use arrow::{ @@ -337,7 +337,14 @@ fn to_interval_single(interval_period: i64, interval_unit: &str) -> Result