-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[MATLAB] Improve arrow.type.Field
display
#37825
Comments
take |
kevingurney
pushed a commit
that referenced
this issue
Sep 25, 2023
### Rationale for this change We should improve the display of `arrow.type.Field`, which currently looks like this: ```matlab >> arrow.field("A", arrow.int32()) ans = A: int32 ``` This display isn't very "MATLAB-like". For instance, it doesn't display the object's class type. This display would be better: ```matlab >> arrow.field("A", arrow.int32()) ans = Field with properties: Name: "A" Type: [1x1 arrow.type.Int32Type] ``` ### What changes are included in this PR? 1. Added `getPropertyGroups` method to `Field`. This method is inherited from the superclass `matlab.mixin.CustomDisplay`. 2. Removed `displayScalarObject` method from `Field`. This method is also inherited from `matlab.mixin.CustomDisplay`. By implementing `getPropertyGroups`, we no longer need to override `displayScalarObject` and can use the default implementation of this method in `CustomDisplay`. 3. Removed `toString()` method from `Field`. This method was private, and only used by `displayScalarObject`. Since `displayScalarObject` has been removed, `toString()` can be deleted too. 4. Converted the helper test methods (`makeLinkString`, `makeDimensionString`, `verifyDisplay`) in `tTypeDisplay` into standalone functions. Test classes other than `tTypeDisplay.m` can now use these utilities as well. ### Are these changes tested? Yes. Added a `TestDisplay` unit test to `tField.m`. ### Are there any user-facing changes? Yes. `arrow.type.Field` objects are now displayed differently in the Command Window. ### Future Directions 1. Update the display of `arrow.tabular.Schema`. 2. Update the display of `arrow.array.Array`. 3. Update the display of `arrow.tabular.Table`. 4. Update the display of `arrow.tabular.RecordBatch`. * Closes: #37825 Authored-by: Sarah Gilmore <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
etseidl
pushed a commit
to etseidl/arrow
that referenced
this issue
Sep 28, 2023
…7826) ### Rationale for this change We should improve the display of `arrow.type.Field`, which currently looks like this: ```matlab >> arrow.field("A", arrow.int32()) ans = A: int32 ``` This display isn't very "MATLAB-like". For instance, it doesn't display the object's class type. This display would be better: ```matlab >> arrow.field("A", arrow.int32()) ans = Field with properties: Name: "A" Type: [1x1 arrow.type.Int32Type] ``` ### What changes are included in this PR? 1. Added `getPropertyGroups` method to `Field`. This method is inherited from the superclass `matlab.mixin.CustomDisplay`. 2. Removed `displayScalarObject` method from `Field`. This method is also inherited from `matlab.mixin.CustomDisplay`. By implementing `getPropertyGroups`, we no longer need to override `displayScalarObject` and can use the default implementation of this method in `CustomDisplay`. 3. Removed `toString()` method from `Field`. This method was private, and only used by `displayScalarObject`. Since `displayScalarObject` has been removed, `toString()` can be deleted too. 4. Converted the helper test methods (`makeLinkString`, `makeDimensionString`, `verifyDisplay`) in `tTypeDisplay` into standalone functions. Test classes other than `tTypeDisplay.m` can now use these utilities as well. ### Are these changes tested? Yes. Added a `TestDisplay` unit test to `tField.m`. ### Are there any user-facing changes? Yes. `arrow.type.Field` objects are now displayed differently in the Command Window. ### Future Directions 1. Update the display of `arrow.tabular.Schema`. 2. Update the display of `arrow.array.Array`. 3. Update the display of `arrow.tabular.Table`. 4. Update the display of `arrow.tabular.RecordBatch`. * Closes: apache#37825 Authored-by: Sarah Gilmore <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
JerAguilon
pushed a commit
to JerAguilon/arrow
that referenced
this issue
Oct 23, 2023
…7826) ### Rationale for this change We should improve the display of `arrow.type.Field`, which currently looks like this: ```matlab >> arrow.field("A", arrow.int32()) ans = A: int32 ``` This display isn't very "MATLAB-like". For instance, it doesn't display the object's class type. This display would be better: ```matlab >> arrow.field("A", arrow.int32()) ans = Field with properties: Name: "A" Type: [1x1 arrow.type.Int32Type] ``` ### What changes are included in this PR? 1. Added `getPropertyGroups` method to `Field`. This method is inherited from the superclass `matlab.mixin.CustomDisplay`. 2. Removed `displayScalarObject` method from `Field`. This method is also inherited from `matlab.mixin.CustomDisplay`. By implementing `getPropertyGroups`, we no longer need to override `displayScalarObject` and can use the default implementation of this method in `CustomDisplay`. 3. Removed `toString()` method from `Field`. This method was private, and only used by `displayScalarObject`. Since `displayScalarObject` has been removed, `toString()` can be deleted too. 4. Converted the helper test methods (`makeLinkString`, `makeDimensionString`, `verifyDisplay`) in `tTypeDisplay` into standalone functions. Test classes other than `tTypeDisplay.m` can now use these utilities as well. ### Are these changes tested? Yes. Added a `TestDisplay` unit test to `tField.m`. ### Are there any user-facing changes? Yes. `arrow.type.Field` objects are now displayed differently in the Command Window. ### Future Directions 1. Update the display of `arrow.tabular.Schema`. 2. Update the display of `arrow.array.Array`. 3. Update the display of `arrow.tabular.Table`. 4. Update the display of `arrow.tabular.RecordBatch`. * Closes: apache#37825 Authored-by: Sarah Gilmore <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
loicalleyne
pushed a commit
to loicalleyne/arrow
that referenced
this issue
Nov 13, 2023
…7826) ### Rationale for this change We should improve the display of `arrow.type.Field`, which currently looks like this: ```matlab >> arrow.field("A", arrow.int32()) ans = A: int32 ``` This display isn't very "MATLAB-like". For instance, it doesn't display the object's class type. This display would be better: ```matlab >> arrow.field("A", arrow.int32()) ans = Field with properties: Name: "A" Type: [1x1 arrow.type.Int32Type] ``` ### What changes are included in this PR? 1. Added `getPropertyGroups` method to `Field`. This method is inherited from the superclass `matlab.mixin.CustomDisplay`. 2. Removed `displayScalarObject` method from `Field`. This method is also inherited from `matlab.mixin.CustomDisplay`. By implementing `getPropertyGroups`, we no longer need to override `displayScalarObject` and can use the default implementation of this method in `CustomDisplay`. 3. Removed `toString()` method from `Field`. This method was private, and only used by `displayScalarObject`. Since `displayScalarObject` has been removed, `toString()` can be deleted too. 4. Converted the helper test methods (`makeLinkString`, `makeDimensionString`, `verifyDisplay`) in `tTypeDisplay` into standalone functions. Test classes other than `tTypeDisplay.m` can now use these utilities as well. ### Are these changes tested? Yes. Added a `TestDisplay` unit test to `tField.m`. ### Are there any user-facing changes? Yes. `arrow.type.Field` objects are now displayed differently in the Command Window. ### Future Directions 1. Update the display of `arrow.tabular.Schema`. 2. Update the display of `arrow.array.Array`. 3. Update the display of `arrow.tabular.Table`. 4. Update the display of `arrow.tabular.RecordBatch`. * Closes: apache#37825 Authored-by: Sarah Gilmore <[email protected]> Signed-off-by: Kevin Gurney <[email protected]>
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this issue
Feb 19, 2024
…7826) ### Rationale for this change We should improve the display of `arrow.type.Field`, which currently looks like this: ```matlab >> arrow.field("A", arrow.int32()) ans = A: int32 ``` This display isn't very "MATLAB-like". For instance, it doesn't display the object's class type. This display would be better: ```matlab >> arrow.field("A", arrow.int32()) ans = Field with properties: Name: "A" Type: [1x1 arrow.type.Int32Type] ``` ### What changes are included in this PR? 1. Added `getPropertyGroups` method to `Field`. This method is inherited from the superclass `matlab.mixin.CustomDisplay`. 2. Removed `displayScalarObject` method from `Field`. This method is also inherited from `matlab.mixin.CustomDisplay`. By implementing `getPropertyGroups`, we no longer need to override `displayScalarObject` and can use the default implementation of this method in `CustomDisplay`. 3. Removed `toString()` method from `Field`. This method was private, and only used by `displayScalarObject`. Since `displayScalarObject` has been removed, `toString()` can be deleted too. 4. Converted the helper test methods (`makeLinkString`, `makeDimensionString`, `verifyDisplay`) in `tTypeDisplay` into standalone functions. Test classes other than `tTypeDisplay.m` can now use these utilities as well. ### Are these changes tested? Yes. Added a `TestDisplay` unit test to `tField.m`. ### Are there any user-facing changes? Yes. `arrow.type.Field` objects are now displayed differently in the Command Window. ### Future Directions 1. Update the display of `arrow.tabular.Schema`. 2. Update the display of `arrow.array.Array`. 3. Update the display of `arrow.tabular.Table`. 4. Update the display of `arrow.tabular.RecordBatch`. * Closes: apache#37825 Authored-by: Sarah Gilmore <[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
Describe the enhancement requested
We should improve the display of
arrow.type.Field
, which currently looks like this:This display isn't very "MATLAB-like". For instance, it doesn't display the object's class type. This display would be better:
Component(s)
MATLAB
The text was updated successfully, but these errors were encountered: