| 767 | |
| 768 | |
| 769 | def test_recordbatch_pickle(pickle_module): |
| 770 | data = [ |
| 771 | pa.array(range(5), type='int8'), |
| 772 | pa.array([-10, -5, 0, 5, 10], type='float32') |
| 773 | ] |
| 774 | fields = [ |
| 775 | pa.field('ints', pa.int8()), |
| 776 | pa.field('floats', pa.float32()), |
| 777 | ] |
| 778 | schema = pa.schema(fields, metadata={b'foo': b'bar'}) |
| 779 | batch = pa.record_batch(data, schema=schema) |
| 780 | |
| 781 | result = pickle_module.loads(pickle_module.dumps(batch)) |
| 782 | assert result.equals(batch) |
| 783 | assert result.schema == schema |
| 784 | |
| 785 | |
| 786 | def test_recordbatch_get_field(): |