zeroshade commented on code in PR #13770:
URL: https://github.com/apache/arrow/pull/13770#discussion_r935857293


##########
go/arrow/datatype_binary.go:
##########
@@ -16,6 +16,10 @@
 
 package arrow
 
+type OffsetTraits interface {
+       BytesRequired(int) int

Review Comment:
   Currently all of the `*Traits` objects (defined in the type_traits_*.go 
files) take in an `int` and return an `int`. On 64-bit machines this would be a 
64-bit integer and on 32-bit machines it would be a 32-bit integer.
   
   I didn't want to change those objects (and risk breaking anyone who was 
using things like `arrow.TimestampTraits.BytesRequired(n)`). In this situation 
I just created an interface which matched those objects so I could have the 
data type objects return them. I'll add a docstring comment, but I don't want 
to modify it to be explicitly `int64` as that would be a signiifcant, 
potentially breaking, change.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to