kou commented on PR #46823:
URL: https://github.com/apache/arrow/pull/46823#issuecomment-2978626344

   Hmm. It seems that `nbytes` is `np.int32` here. How about the following?
   
   ```diff
   diff --git a/dev/archery/archery/integration/datagen.py 
b/dev/archery/archery/integration/datagen.py
   index c8cc36ddc5..18f1d4803d 100644
   --- a/dev/archery/archery/integration/datagen.py
   +++ b/dev/archery/archery/integration/datagen.py
   @@ -609,9 +609,9 @@ class BinaryField(PrimitiveField):
    
            sizes = self._random_sizes(size)
    
   -        for i, nbytes in enumerate(sizes):
   +        for i, np_nbytes in enumerate(sizes):
                if is_valid[i]:
   -                values.append(random_bytes(nbytes))
   +                values.append(random_bytes(int(np_nbytes)))
                else:
                    values.append(b"")
   ```


-- 
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