ibis icon indicating copy to clipboard operation
ibis copied to clipboard

feat: support passing `pa.RecordBatch` in `con.insert`/`con.create_table`

Open jcrist opened this issue 1 year ago • 1 comments
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.

jcrist avatar Jan 29 '24 15:01 jcrist

Additional feature here would be to allow creating a table from an entire RecordBatchReader (more applicable to create_table here)

gforsyth avatar Jan 29 '24 19:01 gforsyth