GitHub user BryanCutler opened a pull request: https://github.com/apache/spark/pull/18787
[SPARK-21583][SQL] Create a ColumnarBatch from ArrowColumnVectors ## What changes were proposed in this pull request? This PR allows the creation of a `ColumnarBatch` from `ReadOnlyColumnVectors` where previously a columnar batch could only allocate vectors internally. This is useful for using `ArrowColumnVectors` in a batch form to do row-based iteration. Also added `ArrowConverter.fromPayloadIterator` which converts `ArrowPayload` iterator to `InternalRow` iterator and uses a `ColumnarBatch` internally. ## How was this patch tested? Added a new unit test for creating a `ColumnarBatch` with `ReadOnlyColumnVectors` and a test to verify the roundtrip of rows -> ArrowPayload -> rows, using `toPayloadIterator` and `fromPayloadIterator`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/BryanCutler/spark arrow-ColumnarBatch-support-SPARK-21583 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/18787.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #18787 ---- commit 0c39389cbcf34255d446aac46d1ed01b795e5835 Author: Bryan Cutler <cutl...@gmail.com> Date: 2017-07-27T22:31:05Z refactored ColumnarBatch to allow creating from ColumnVectors commit a4be6cf0bb0363e394c520b121835e3190c36730 Author: Bryan Cutler <cutl...@gmail.com> Date: 2017-07-31T19:11:19Z Added fromPayloadIterator to use ColumnarBatch for row iteration commit f35b92c823db4b02edc6de0208fe17ce8b6c96c6 Author: Bryan Cutler <cutl...@gmail.com> Date: 2017-07-31T21:11:43Z added unit tests for ColumnarBatch with Arrow, and fromPayloadIterator ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org