Skip to content

Commit

Permalink
remove needless Clone of TimeUnit type which is Copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed Jul 25, 2024
1 parent 8efec4b commit cc2e104
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl DataTypeMap {
SqlType::FLOAT,
)),
DataType::Timestamp(unit, tz) => Ok(DataTypeMap::new(
DataType::Timestamp(unit.clone(), tz.clone()),
DataType::Timestamp(*unit, tz.clone()),
PythonType::Datetime,
SqlType::DATE,
)),
Expand All @@ -147,20 +147,20 @@ impl DataTypeMap {
SqlType::DATE,
)),
DataType::Time32(unit) => Ok(DataTypeMap::new(
DataType::Time32(unit.clone()),
DataType::Time32(*unit),
PythonType::Datetime,
SqlType::DATE,
)),
DataType::Time64(unit) => Ok(DataTypeMap::new(
DataType::Time64(unit.clone()),
DataType::Time64(*unit),
PythonType::Datetime,
SqlType::DATE,
)),
DataType::Duration(_) => Err(py_datafusion_err(DataFusionError::NotImplemented(
format!("{:?}", arrow_type),
))),
DataType::Interval(interval_unit) => Ok(DataTypeMap::new(
DataType::Interval(interval_unit.clone()),
DataType::Interval(*interval_unit),
PythonType::Datetime,
match interval_unit {
IntervalUnit::DayTime => SqlType::INTERVAL_DAY,
Expand Down

0 comments on commit cc2e104

Please sign in to comment.