Skip to content

Commit

Permalink
Fix 32-bit build
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed May 16, 2024
1 parent 25bf96a commit 3dce0f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arrow-buffer/src/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ impl ArrowNativeType for IntervalMonthDayNano {
}

fn as_usize(self) -> usize {
(self.months as usize) | ((self.days as usize) << 32)
((self.months as u64) | ((self.days as u64) << 32)) as usize
}

fn usize_as(i: usize) -> Self {
Self::new(i as _, (i >> 32) as _, 0)
Self::new(i as _, ((i as u64) >> 32) as _, 0)
}

fn to_usize(self) -> Option<usize> {
Expand All @@ -273,11 +273,11 @@ impl ArrowNativeType for IntervalDayTime {
}

fn as_usize(self) -> usize {
(self.days as usize) | ((self.milliseconds as usize) << 32)
((self.days as u64) | ((self.milliseconds as u64) << 32)) as usize
}

fn usize_as(i: usize) -> Self {
Self::new(i as _, (i >> 32) as _)
Self::new(i as _, ((i as u64) >> 32) as _)
}

fn to_usize(self) -> Option<usize> {
Expand Down

0 comments on commit 3dce0f6

Please sign in to comment.