Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix clippy with latest arrow
  • Loading branch information
alamb committed Jun 17, 2024
commit d9057fbe7c5bd15f414c51eb87d10939e01c4e08
2 changes: 1 addition & 1 deletion datafusion/expr/src/type_coercion/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ fn temporal_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataTyp
(Nanosecond, Microsecond) => Microsecond,
(l, r) => {
assert_eq!(l, r);
l.clone()
*l
}
};

Expand Down
4 changes: 2 additions & 2 deletions datafusion/expr/src/type_coercion/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,11 +607,11 @@ fn coerced_from<'a>(
(Timestamp(unit, Some(tz)), _) if tz.as_ref() == TIMEZONE_WILDCARD => {
match type_from {
Timestamp(_, Some(from_tz)) => {
Some(Timestamp(unit.clone(), Some(from_tz.clone())))
Some(Timestamp(*unit, Some(from_tz.clone())))
}
Null | Date32 | Utf8 | LargeUtf8 | Timestamp(_, None) => {
// In the absence of any other information assume the time zone is "+00" (UTC).
Some(Timestamp(unit.clone(), Some("+00".into())))
Some(Timestamp(*unit, Some("+00".into())))
}
_ => None,
}
Expand Down
14 changes: 7 additions & 7 deletions datafusion/functions/src/datetime/date_bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,35 +57,35 @@ impl DateBinFunc {
vec![
Exact(vec![
DataType::Interval(MonthDayNano),
Timestamp(array_type.clone(), None),
Timestamp(array_type, None),
Timestamp(Nanosecond, None),
]),
Exact(vec![
DataType::Interval(MonthDayNano),
Timestamp(array_type.clone(), Some(TIMEZONE_WILDCARD.into())),
Timestamp(array_type, Some(TIMEZONE_WILDCARD.into())),
Timestamp(Nanosecond, Some(TIMEZONE_WILDCARD.into())),
]),
Exact(vec![
DataType::Interval(DayTime),
Timestamp(array_type.clone(), None),
Timestamp(array_type, None),
Timestamp(Nanosecond, None),
]),
Exact(vec![
DataType::Interval(DayTime),
Timestamp(array_type.clone(), Some(TIMEZONE_WILDCARD.into())),
Timestamp(array_type, Some(TIMEZONE_WILDCARD.into())),
Timestamp(Nanosecond, Some(TIMEZONE_WILDCARD.into())),
]),
Exact(vec![
DataType::Interval(MonthDayNano),
Timestamp(array_type.clone(), None),
Timestamp(array_type, None),
]),
Exact(vec![
DataType::Interval(MonthDayNano),
Timestamp(array_type.clone(), Some(TIMEZONE_WILDCARD.into())),
Timestamp(array_type, Some(TIMEZONE_WILDCARD.into())),
]),
Exact(vec![
DataType::Interval(DayTime),
Timestamp(array_type.clone(), None),
Timestamp(array_type, None),
]),
Exact(vec![
DataType::Interval(DayTime),
Expand Down