Skip to content

Commit

Permalink
update value_interval_daytime
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed Jun 12, 2024
1 parent 2e17661 commit e1c4ad9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/expr/literal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ impl PyLiteral {
pub fn value_interval_day_time(&self) -> PyResult<Option<(i32, i32)>> {
match &self.value {
ScalarValue::IntervalDayTime(Some(iv)) => {
let interval = *iv as u64;
let days = (interval >> 32) as i32;
let ms = interval as i32;
Ok(Some((days, ms)))
Ok(Some((iv.days, iv.milliseconds)))
}
ScalarValue::IntervalDayTime(None) => Ok(None),
other => Err(unexpected_literal_value(other)),
Expand Down

0 comments on commit e1c4ad9

Please sign in to comment.