Skip to content

[Python][C++] pyarrow.repeat returns an invalid array when a chunked array is required. #36388

@daniel-shields

Description

@daniel-shields

Describe the bug, including details regarding any error messages, version, and platform.

pyarrow.repeat silently fails and returns an invalid array when the result cannot fit in a single chunk.

import sys
import pyarrow as pa
print(f"{sys.version}")
print(f"{pa.__version__=}")

array = pa.repeat("?", 2**31 - 1)
print(array)
array = pa.repeat("?", 2**31)
print(array)

output:

3.9.12 (main, Jan  1 2020, 00:00:00) 
[GCC 8.3.0]
pa.__version__='12.0.0'
[
  "?",
  "?",
  ...
  "?",
  "?",
]
<Invalid array: Negative offsets in binary array>

Component(s)

Python

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions