-
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-38166: [MATLAB] Improve tabular object display #38482
Conversation
to arrow.internal.display package
…display.getTabular
….display.getSchemaString
2. Add "Arrow" prefix to header
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! This is a great improvement! Thank you!
+1 |
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 547b240. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
### Rationale for this change Currently, the display for `arrow.tabular.RecordBatch` and `arrow.tabular.Table` are not very MATLAB-like. ### What changes are included in this PR? 1. Updated the display of both `arrow.tabular.Table` and `arrow.tabular.RecordBatch`. 2. Added a new utility function `arrow.internal.display.boldFontIfPossible` 3. Renamed `arrow.array.internal.display.pluralizeStringIfNeeded` to `arrow.internal.display.pluralizeStringIfNeeded` 4. Renamed `arrow.tabular.internal.displaySchema` to `arrow.tabular.internal.display.getSchemaString`. **Example RecordBatch Display** ```matlab >> t = table(1, false, datetime(2023, 1, 1), VariableNames=["Number", "Logical", "Date"]); >> rb = arrow.recordBatch(t) rb = Arrow RecordBatch with 1 row and 3 columns: Schema: Number: Float64 | Logical: Boolean | Date: Timestamp First Row: 1 | false | 2023-01-01 00:00:00.000000 ``` **Example Table Display** ```matlab >> t = table(1, false, datetime(2023, 1, 1), VariableNames=["Number", "Logical", "Date"]); >> arrowTable = arrow.table(t) arrowTable = Arrow Table with 1 row and 3 columns: Schema: Number: Float64 | Logical: Boolean | Date: Timestamp First Row: 1 | false | 2023-01-01 00:00:00.000000 ``` ### Are these changes tested? Yes, I added a new test class in `matlab/test/arrow/tabular` called `tTabularDisplay.m`. ### Are there any user-facing changes? Yes. Users will now see the new `Table`/`RecordBatch` display * Closes: apache#38166 Authored-by: Sarah Gilmore <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
### Rationale for this change Currently, the display for `arrow.tabular.RecordBatch` and `arrow.tabular.Table` are not very MATLAB-like. ### What changes are included in this PR? 1. Updated the display of both `arrow.tabular.Table` and `arrow.tabular.RecordBatch`. 2. Added a new utility function `arrow.internal.display.boldFontIfPossible` 3. Renamed `arrow.array.internal.display.pluralizeStringIfNeeded` to `arrow.internal.display.pluralizeStringIfNeeded` 4. Renamed `arrow.tabular.internal.displaySchema` to `arrow.tabular.internal.display.getSchemaString`. **Example RecordBatch Display** ```matlab >> t = table(1, false, datetime(2023, 1, 1), VariableNames=["Number", "Logical", "Date"]); >> rb = arrow.recordBatch(t) rb = Arrow RecordBatch with 1 row and 3 columns: Schema: Number: Float64 | Logical: Boolean | Date: Timestamp First Row: 1 | false | 2023-01-01 00:00:00.000000 ``` **Example Table Display** ```matlab >> t = table(1, false, datetime(2023, 1, 1), VariableNames=["Number", "Logical", "Date"]); >> arrowTable = arrow.table(t) arrowTable = Arrow Table with 1 row and 3 columns: Schema: Number: Float64 | Logical: Boolean | Date: Timestamp First Row: 1 | false | 2023-01-01 00:00:00.000000 ``` ### Are these changes tested? Yes, I added a new test class in `matlab/test/arrow/tabular` called `tTabularDisplay.m`. ### Are there any user-facing changes? Yes. Users will now see the new `Table`/`RecordBatch` display * Closes: apache#38166 Authored-by: Sarah Gilmore <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
Rationale for this change
Currently, the display for
arrow.tabular.RecordBatch
andarrow.tabular.Table
are not very MATLAB-like.What changes are included in this PR?
arrow.tabular.Table
andarrow.tabular.RecordBatch
.arrow.internal.display.boldFontIfPossible
arrow.array.internal.display.pluralizeStringIfNeeded
toarrow.internal.display.pluralizeStringIfNeeded
arrow.tabular.internal.displaySchema
toarrow.tabular.internal.display.getSchemaString
.Example RecordBatch Display
Example Table Display
Are these changes tested?
Yes, I added a new test class in
matlab/test/arrow/tabular
calledtTabularDisplay.m
.Are there any user-facing changes?
Yes. Users will now see the new
Table
/RecordBatch
display