From b12fd55f6b5c72700533d91210b8e3c7eb9a1807 Mon Sep 17 00:00:00 2001 From: Evert Lammerts Date: Tue, 20 Oct 2026 16:00:18 +0000 Subject: [PATCH] Build the dictionary test's indices with a 64 bit arange --- tests/fast/arrow/scan/test_arrow_scan_row_ranges.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/fast/arrow/scan/test_arrow_scan_row_ranges.py b/tests/fast/arrow/scan/test_arrow_scan_row_ranges.py index d808e400..2c863e5d 100644 --- a/tests/fast/arrow/scan/test_arrow_scan_row_ranges.py +++ b/tests/fast/arrow/scan/test_arrow_scan_row_ranges.py @@ -320,7 +320,9 @@ def test_run_ends_that_change_between_large_batches(self, threads): def test_a_dictionary_is_decoded_once_per_large_batch(self): values = pa.array([f"value-{i:08d}" for i in range(DICTIONARY_VALUES)]) # In order, since random indices into a large dictionary make the time depend on the machine's caches. - indices = pa.array((np.arange(DICTIONARY_ROWS) * DICTIONARY_VALUES // DICTIONARY_ROWS).astype(np.int32)) + indices = pa.array( + (np.arange(DICTIONARY_ROWS, dtype=np.int64) * DICTIONARY_VALUES // DICTIONARY_ROWS).astype(np.int32) + ) whole = pa.table({"d": pa.DictionaryArray.from_arrays(indices, values)}) # Each slice keeps the whole dictionary, which the scan decodes again for every batch because it drops the # decoded dictionary when the batch changes.