Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-10687
ColumnarValue::into_array requires a batch argument, which is used to get the number of rows from the batch.
It would be better to just pass in the number of rows instead so that we can use this function in cases where we do not have a batch available.