sgilmore10 opened a new pull request, #46885:
URL: https://github.com/apache/arrow/pull/46885
Thanks for opening a pull request!
If this is your first pull request you can find detailed information on how
to contribute here:
* [New Contributor's
Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
* [Contributing
Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
Please remove this line and the above text before creating your pull request.
### Rationale for this change
This change makes it possible to create an `arrow.tabular.Table` instance
from a list of `arrow.tabular.RecordBatch` instances whose `Schema`s are
consistent.
### What changes are included in this PR?
Added a new static method called `fromRecordBatches` to the MATLAB class
`arrow.tabular.Table`. This method should construct an `arrow.tabular.Table`
from a variable number of `arrow.tabular.RecordBatch`es.
**Usage Example**
```matlab
>> rb1 = arrow.recordBatch(table([1:5]', [6:10]'));
>> rb2 = arrow.recordBatch(table([11:15]', [16:20]'));
>> table = arrow.tabular.Table.fromRecordBatches(rb1, rb2)
table =
Arrow Table with 10 rows and 2 columns:
Schema:
Var1: Float64 | Var2: Float64
First Row:
1 | 6
```
### Are these changes tested?
Yes. Added four new test cases to the MATLAB test class `tTable`:
1. `FromRecordBatchesZeroInputsError`
2. `FromRecordBatchesOneInput`
3. `FromRecordBatchesMultipleInputs`
4. `FromRecordBatchesInconsistentSchemaError`
### Are there any user-facing changes?
Yes. Users can now create an `arrow.tabular.Table` instance via the static
method `fromRecordBatches`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]