jorisvandenbossche commented on code in PR #43974:
URL: https://github.com/apache/arrow/pull/43974#discussion_r1753437281
##########
python/pyarrow/tests/test_table.py:
##########
@@ -3781,11 +3785,15 @@ def test_table_non_cpu(cuda_context, cpu_table,
cuda_table,
# add_column(), set_column() test
for fn in [cuda_table.add_column, cuda_table.set_column]:
- col = pa.array([1] * cuda_table.num_rows, pa.int8()
- ).copy_to(cuda_context.memory_manager)
- new_table = fn(2, 'c2', col)
+ cpu_col = pa.array([1] * N, pa.int8())
+ cuda_col = cpu_col.copy_to(cuda_context.memory_manager)
+ new_table = fn(2, 'c2', cuda_col)
verify_cuda_table(new_table, expected_schema=schema.append(
pa.field('c2', pa.int8())))
+ new_table = fn(2, 'c2', cpu_col)
+ assert new_table.column(0).is_cpu is False
Review Comment:
```suggestion
assert new_table.is_cpu is False
assert new_table.column(0).is_cpu is False
```
--
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]