(draw, type, rows=None, max_fields=None)
| 437 | |
| 438 | @st.composite |
| 439 | def record_batches(draw, type, rows=None, max_fields=None): |
| 440 | if isinstance(rows, st.SearchStrategy): |
| 441 | rows = draw(rows) |
| 442 | elif rows is None: |
| 443 | rows = draw(_default_array_sizes) |
| 444 | elif not isinstance(rows, int): |
| 445 | raise TypeError('Rows must be an integer') |
| 446 | |
| 447 | schema = draw(schemas(type, max_fields=max_fields)) |
| 448 | children = [draw(arrays(field.type, size=rows)) for field in schema] |
| 449 | return pa.RecordBatch.from_arrays(children, schema=schema) |
| 450 | |
| 451 | |
| 452 | @st.composite |
no test coverage detected