(factory, scalar_type)
| 1382 | pa.uint8(), pa.uint16(), pa.uint32(), pa.uint64(), |
| 1383 | ]) |
| 1384 | def test_table_like_slice_integer_scalars(factory, scalar_type): |
| 1385 | data = [pa.array(range(10))] |
| 1386 | names = ["c0"] |
| 1387 | if factory is pa.chunked_array: |
| 1388 | obj = factory(data) |
| 1389 | else: |
| 1390 | obj = factory(data, names=names) |
| 1391 | offsets = pa.array([2, 4], type=scalar_type) |
| 1392 | |
| 1393 | result = obj.slice(offsets[0], offsets[1]) |
| 1394 | |
| 1395 | assert result.equals(obj.slice(2, 4)) |
| 1396 | |
| 1397 | |
| 1398 | @pytest.mark.parametrize("factory", [ |