ibis
ibis copied to clipboard
feat: support passing `pa.RecordBatch` in `con.insert`/`con.create_table`
trafficstars
This comes up when iterating over batches in to_pyarrow_batches in code like:
for batch in con1.to_pyarrow_batches(expr):
con2.insert("table_name", batch)
# currently this needs to be
# con2.insert("table_name", pa.Table.from_batches([batch]))
Ideally in most places where it makes sense a pa.RecordBatch could be implicitly coerced to a pa.Table.
Additional feature here would be to allow creating a table from an entire RecordBatchReader (more applicable to create_table here)