westonpace commented on issue #11648: URL: https://github.com/apache/arrow/issues/11648#issuecomment-965581002
I didn't realize the question was about tables. Tables are simply a collection of record batches with the same schema. So you can append to a table by creating a new table with the new record batch. For example, in pyarrow: ``` >>> import pyarrow as pa >>> t1 = pa.Table.from_pydict({'a': [1, 2, 3], 'b': ['x', 'y', 'z']}) >>> t2 = pa.Table.from_pydict({'a': [4, 5, 6], 'b': ['a', 'b', 'c']}) >>> combined = pa.Table.from_batches(t1.to_batches() + t2.to_batches()) >>> combined.to_pydict() {'a': [1, 2, 3, 4, 5, 6], 'b': ['x', 'y', 'z', 'a', 'b', 'c']} ``` If you truly need each array to be a contiguous region in memory then @edponce 's advice about concatenating is the way to go. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org