()
| 1255 | |
| 1256 | |
| 1257 | def test_recordbatch_to_tensor_unsupported(): |
| 1258 | arr1 = [1, 2, 3, 4, 5, 6, 7, 8, 9] |
| 1259 | # Unsupported data type |
| 1260 | arr2 = ["a", "b", "c", "a", "b", "c", "a", "b", "c"] |
| 1261 | batch = pa.RecordBatch.from_arrays( |
| 1262 | [ |
| 1263 | pa.array(arr1, type=pa.int32()), |
| 1264 | pa.array(arr2, type=pa.utf8()), |
| 1265 | ], ["a", "b"] |
| 1266 | ) |
| 1267 | with pytest.raises( |
| 1268 | pa.ArrowTypeError, |
| 1269 | match="DataType is not supported" |
| 1270 | ): |
| 1271 | batch.to_tensor() |
| 1272 | |
| 1273 | |
| 1274 | @pytest.mark.numpy |