I'm implementing Array$cast() in the R package, i.e. https://issues.apache.org/jira/browse/ARROW-3741?filter=12344983
I'm seeing some weird results when casting from int32 to uint32 and uint64 (I'm expecting errors here as it's supposed to be safe https://github.com/apache/arrow/pull/2959#issuecomment-438606974 a <- array(-(1:3)) a$cast(uint16()) #> Error in Array__cast(self, target_type, options): Invalid: Integer value out of bounds a$cast(uint16()) #> Error in Array__cast(self, target_type, options): Invalid: Integer value out of bounds a$cast(uint32()) #> arrow::Array #> [ #> 4294967295, #> 4294967294, #> 4294967293 #> ] a$cast(uint32())$type() #> arrow::UInt32 #> uint32 a$cast(uint64()) #> arrow::Array #> [ #> -1, #> -2, #> -3 #> ] a$cast(uint64())$type() #> arrow::UInt64 #> uint64 I don't think this is an R issue. Can someone using other front ends to the C++ library check if they get the same problem ?