Skip to content

Commit

Permalink
Temporary workaround for IntoPyObject constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Plus-Time committed Feb 23, 2025
1 parent 9f7ef44 commit b4caf36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyo3-arrow/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,22 @@ impl PyScalar {
TimeUnit::Second => arr
.as_primitive::<TimestampSecondType>()
.value_as_datetime_with_tz(0, tz)
.map(|v| v.fixed_offset())
.into_py_any(py)?,
TimeUnit::Millisecond => arr
.as_primitive::<TimestampMillisecondType>()
.value_as_datetime_with_tz(0, tz)
.map(|v| v.fixed_offset())
.into_py_any(py)?,
TimeUnit::Microsecond => arr
.as_primitive::<TimestampMicrosecondType>()
.value_as_datetime_with_tz(0, tz)
.map(|v| v.fixed_offset())
.into_py_any(py)?,
TimeUnit::Nanosecond => arr
.as_primitive::<TimestampNanosecondType>()
.value_as_datetime_with_tz(0, tz)
.map(|v| v.fixed_offset())
.into_py_any(py)?,
}
} else {
Expand Down

0 comments on commit b4caf36

Please sign in to comment.