(draw, type, rows=None, max_fields=None)
| 417 | |
| 418 | @st.composite |
| 419 | def record_batches(draw, type, rows=None, max_fields=None): |
| 420 | if isinstance(rows, st.SearchStrategy): |
| 421 | rows = draw(rows) |
| 422 | elif rows is None: |
| 423 | rows = draw(_default_array_sizes) |
| 424 | elif not isinstance(rows, int): |
| 425 | raise TypeError('Rows must be an integer') |
| 426 | |
| 427 | schema = draw(schemas(type, max_fields=max_fields)) |
| 428 | children = [draw(arrays(field.type, size=rows)) for field in schema] |
| 429 | return pa.RecordBatch.from_arrays(children, schema=schema) |
| 430 | |
| 431 | |
| 432 | @st.composite |
no test coverage detected