From 3dce0f63fac03b33f4672628d4372eac41bc2aa3 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Thu, 16 May 2024 11:02:22 +0100 Subject: [PATCH] Fix 32-bit build --- arrow-buffer/src/native.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arrow-buffer/src/native.rs b/arrow-buffer/src/native.rs index c903057ae98f..e05c1311ff3c 100644 --- a/arrow-buffer/src/native.rs +++ b/arrow-buffer/src/native.rs @@ -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 { @@ -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 {