-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-37592: [MATLAB] Add NumRows
property to arrow.tabular.RecordBatch
#38215
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2. Update `tRecordBatch` to use new `NumRows` property.
github-actions
bot
added
Component: MATLAB
awaiting committer review
Awaiting committer review
labels
Oct 11, 2023
sgilmore10
approved these changes
Oct 11, 2023
+1 |
llama90
pushed a commit
to llama90/arrow
that referenced
this pull request
Oct 12, 2023
…ordBatch` (apache#38215) ### Rationale for this change Currently, there is a `NumColumns` property on `arrow.tabular.RecordBatch`, but no `NumRows` property. It would be useful to be able to query the number of rows in a `RecordBatch`. This pull request adds a `NumRows` property to `arrow.tabular.RecordBatch` to mirror the design of `arrow.tabular.Table`. ### What changes are included in this PR? 1. Added new `NumRows` property to `arrow.tabular.RecordBatch` **Example** ```matlab >> matlabTable = array2table(rand(10, 5)) matlabTable = 10x5 table Var1 Var2 Var3 Var4 Var5 ________ ________ _______ _______ ________ 0.76062 0.12009 0.98898 0.29974 0.42165 0.64994 0.85116 0.71768 0.58693 0.31061 0.33593 0.87823 0.87766 0.38206 0.45742 0.031364 0.8336 0.71528 0.14987 0.3618 0.5986 0.81193 0.25784 0.21073 0.76715 0.46493 0.40281 0.39729 0.16737 0.94521 0.18738 0.16351 0.46437 0.45545 0.40774 0.67682 0.3577 0.94882 0.1295 0.022501 0.29368 0.47122 0.99682 0.46011 0.34275 0.6849 0.064717 0.89719 0.38302 0.4523 >> arrowRecordBatch = arrow.recordBatch(matlabTable); >> arrowRecordBatch.NumRows ans = int64 10 ``` ### Are these changes tested? Yes. 1. Added `NumRows` test to `tRecordBatch` test class. 3. Updated `EmptyTable` test (renamed to `EmptyRecordBatch`) in `tRecordBatch` test class. 4. Added `FromArraysNoInputs` test to mirror the `FromArraysNoInputs` test in `tTable` test class. ### Are there any user-facing changes? Yes. This pull request adds a new public `NumRows` property to the `arrow.tabular.RecordBatch` class. Users can query the number of rows in an `arrow.tabular.RecordBatch` by accessing the `NumRows` property. ### Future Directions 1. apache#38214 3. apache#38213 * Closes: apache#37592 Authored-by: Kevin Gurney <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit ef02417. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them. |
JerAguilon
pushed a commit
to JerAguilon/arrow
that referenced
this pull request
Oct 23, 2023
…ordBatch` (apache#38215) ### Rationale for this change Currently, there is a `NumColumns` property on `arrow.tabular.RecordBatch`, but no `NumRows` property. It would be useful to be able to query the number of rows in a `RecordBatch`. This pull request adds a `NumRows` property to `arrow.tabular.RecordBatch` to mirror the design of `arrow.tabular.Table`. ### What changes are included in this PR? 1. Added new `NumRows` property to `arrow.tabular.RecordBatch` **Example** ```matlab >> matlabTable = array2table(rand(10, 5)) matlabTable = 10x5 table Var1 Var2 Var3 Var4 Var5 ________ ________ _______ _______ ________ 0.76062 0.12009 0.98898 0.29974 0.42165 0.64994 0.85116 0.71768 0.58693 0.31061 0.33593 0.87823 0.87766 0.38206 0.45742 0.031364 0.8336 0.71528 0.14987 0.3618 0.5986 0.81193 0.25784 0.21073 0.76715 0.46493 0.40281 0.39729 0.16737 0.94521 0.18738 0.16351 0.46437 0.45545 0.40774 0.67682 0.3577 0.94882 0.1295 0.022501 0.29368 0.47122 0.99682 0.46011 0.34275 0.6849 0.064717 0.89719 0.38302 0.4523 >> arrowRecordBatch = arrow.recordBatch(matlabTable); >> arrowRecordBatch.NumRows ans = int64 10 ``` ### Are these changes tested? Yes. 1. Added `NumRows` test to `tRecordBatch` test class. 3. Updated `EmptyTable` test (renamed to `EmptyRecordBatch`) in `tRecordBatch` test class. 4. Added `FromArraysNoInputs` test to mirror the `FromArraysNoInputs` test in `tTable` test class. ### Are there any user-facing changes? Yes. This pull request adds a new public `NumRows` property to the `arrow.tabular.RecordBatch` class. Users can query the number of rows in an `arrow.tabular.RecordBatch` by accessing the `NumRows` property. ### Future Directions 1. apache#38214 3. apache#38213 * Closes: apache#37592 Authored-by: Kevin Gurney <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
loicalleyne
pushed a commit
to loicalleyne/arrow
that referenced
this pull request
Nov 13, 2023
…ordBatch` (apache#38215) ### Rationale for this change Currently, there is a `NumColumns` property on `arrow.tabular.RecordBatch`, but no `NumRows` property. It would be useful to be able to query the number of rows in a `RecordBatch`. This pull request adds a `NumRows` property to `arrow.tabular.RecordBatch` to mirror the design of `arrow.tabular.Table`. ### What changes are included in this PR? 1. Added new `NumRows` property to `arrow.tabular.RecordBatch` **Example** ```matlab >> matlabTable = array2table(rand(10, 5)) matlabTable = 10x5 table Var1 Var2 Var3 Var4 Var5 ________ ________ _______ _______ ________ 0.76062 0.12009 0.98898 0.29974 0.42165 0.64994 0.85116 0.71768 0.58693 0.31061 0.33593 0.87823 0.87766 0.38206 0.45742 0.031364 0.8336 0.71528 0.14987 0.3618 0.5986 0.81193 0.25784 0.21073 0.76715 0.46493 0.40281 0.39729 0.16737 0.94521 0.18738 0.16351 0.46437 0.45545 0.40774 0.67682 0.3577 0.94882 0.1295 0.022501 0.29368 0.47122 0.99682 0.46011 0.34275 0.6849 0.064717 0.89719 0.38302 0.4523 >> arrowRecordBatch = arrow.recordBatch(matlabTable); >> arrowRecordBatch.NumRows ans = int64 10 ``` ### Are these changes tested? Yes. 1. Added `NumRows` test to `tRecordBatch` test class. 3. Updated `EmptyTable` test (renamed to `EmptyRecordBatch`) in `tRecordBatch` test class. 4. Added `FromArraysNoInputs` test to mirror the `FromArraysNoInputs` test in `tTable` test class. ### Are there any user-facing changes? Yes. This pull request adds a new public `NumRows` property to the `arrow.tabular.RecordBatch` class. Users can query the number of rows in an `arrow.tabular.RecordBatch` by accessing the `NumRows` property. ### Future Directions 1. apache#38214 3. apache#38213 * Closes: apache#37592 Authored-by: Kevin Gurney <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this pull request
Feb 19, 2024
…ordBatch` (apache#38215) ### Rationale for this change Currently, there is a `NumColumns` property on `arrow.tabular.RecordBatch`, but no `NumRows` property. It would be useful to be able to query the number of rows in a `RecordBatch`. This pull request adds a `NumRows` property to `arrow.tabular.RecordBatch` to mirror the design of `arrow.tabular.Table`. ### What changes are included in this PR? 1. Added new `NumRows` property to `arrow.tabular.RecordBatch` **Example** ```matlab >> matlabTable = array2table(rand(10, 5)) matlabTable = 10x5 table Var1 Var2 Var3 Var4 Var5 ________ ________ _______ _______ ________ 0.76062 0.12009 0.98898 0.29974 0.42165 0.64994 0.85116 0.71768 0.58693 0.31061 0.33593 0.87823 0.87766 0.38206 0.45742 0.031364 0.8336 0.71528 0.14987 0.3618 0.5986 0.81193 0.25784 0.21073 0.76715 0.46493 0.40281 0.39729 0.16737 0.94521 0.18738 0.16351 0.46437 0.45545 0.40774 0.67682 0.3577 0.94882 0.1295 0.022501 0.29368 0.47122 0.99682 0.46011 0.34275 0.6849 0.064717 0.89719 0.38302 0.4523 >> arrowRecordBatch = arrow.recordBatch(matlabTable); >> arrowRecordBatch.NumRows ans = int64 10 ``` ### Are these changes tested? Yes. 1. Added `NumRows` test to `tRecordBatch` test class. 3. Updated `EmptyTable` test (renamed to `EmptyRecordBatch`) in `tRecordBatch` test class. 4. Added `FromArraysNoInputs` test to mirror the `FromArraysNoInputs` test in `tTable` test class. ### Are there any user-facing changes? Yes. This pull request adds a new public `NumRows` property to the `arrow.tabular.RecordBatch` class. Users can query the number of rows in an `arrow.tabular.RecordBatch` by accessing the `NumRows` property. ### Future Directions 1. apache#38214 3. apache#38213 * Closes: apache#37592 Authored-by: Kevin Gurney <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Currently, there is a
NumColumns
property onarrow.tabular.RecordBatch
, but noNumRows
property. It would be useful to be able to query the number of rows in aRecordBatch
.This pull request adds a
NumRows
property toarrow.tabular.RecordBatch
to mirror the design ofarrow.tabular.Table
.What changes are included in this PR?
NumRows
property toarrow.tabular.RecordBatch
Example
Are these changes tested?
Yes.
NumRows
test totRecordBatch
test class.EmptyTable
test (renamed toEmptyRecordBatch
) intRecordBatch
test class.FromArraysNoInputs
test to mirror theFromArraysNoInputs
test intTable
test class.Are there any user-facing changes?
Yes.
This pull request adds a new public
NumRows
property to thearrow.tabular.RecordBatch
class. Users can query the number of rows in anarrow.tabular.RecordBatch
by accessing theNumRows
property.Future Directions
arrow.tabular.Tabular
MATLAB interface #38214Table
andRecordBatch
) #38213NumRows
property toarrow.tabular.RecordBatch
#37592