Skip to content

Commit 83c6697

Browse files
committed
fixup
1 parent cd2c9e4 commit 83c6697

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

datafusion/physical-expr/src/datetime_expressions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,9 @@ fn date_bin_impl(
357357
ColumnarValue::Scalar(ScalarValue::IntervalMonthDayNano(Some(v))) => {
358358
let (months, days, nanos) = IntervalMonthDayNanoType::to_parts(*v);
359359
if months != 0 {
360-
return Err(DataFusionError::NotImplemented(format!(
361-
"DATE_BIN stride does not support month intervals, got {months}"
362-
)));
360+
return Err(DataFusionError::NotImplemented(
361+
"DATE_BIN stride does not support month intervals".to_string(),
362+
));
363363
}
364364
let nanos = (Duration::days(days as i64) + Duration::nanoseconds(nanos))
365365
.num_nanoseconds();

datafusion/sql/src/expr/value.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
209209
let value = if let Some(leading_field) = leading_field.as_ref() {
210210
format!("{value} {leading_field}")
211211
} else {
212-
value
212+
// default to seconds for the units
213+
format!("{value} seconds")
213214
};
214215

215216
let val = parse_interval_month_day_nano(&value)?;

0 commit comments

Comments
 (0)