-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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] Implement isequal
for the arrow.tabular.RecordBatch
MATLAB class
#37570
Comments
This was referenced Sep 7, 2023
kevingurney
pushed a commit
that referenced
this issue
Sep 7, 2023
…LAB class (#37617) ### Rationale for this change Following on to #37474, #37446, and #37525, we should implement `isequal` for the `arrow.type.Field` MATLAB class. ### What changes are included in this PR? 1. Implemented the `isequal` method for `arrow.type.Field` ### Are these changes tested? Yes. Add new unit tests to `tField.m` ### Are there any user-facing changes? Yes. Users can now call `isequal` on `arrow.type.Field`s to determine if two fields are equal. **Example** ```matlab >> f1 = arrow.field("A", arrow.time32(TimeUnit="Second")); >> f2 = arrow.field("B", arrow.time32(TimeUnit="Second")); >> f3 = arrow.field("A", arrow.time32(TimeUnit="Millisecond")); >> isequal(f1, f1) ans = logical 1 % Name properties differ >> isequal(f1, f2) ans = logical 0 % Type properties differ >> isequal(f1, f3) ans = logical 0 ``` ### Future Directions 1. #37568 2. #37570 * Closes: #37569 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
kevingurney
pushed a commit
that referenced
this issue
Sep 7, 2023
… MATLAB class (#37619) ### Rationale for this change Following on to #37474, #37446, and #37525, we should implement `isequal` for the `arrow.tabular.Schema` MATLAB class. ### What changes are included in this PR? 1. Updated `arrow.tabular.Schema` class to inherit from `matlab.mixin.Scalar`. 2. Added `isequal` method to `arrow.tabular.Schema`. ### Are these changes tested? Yes. Added `isequal` unit tests to `tSchema.m` ### Are there any user-facing changes? Yes. Users can now compare two `arrow.tabular.Schema` objects via `isequal`. **Example** ```matlab >> schema1 = arrow.schema([arrow.field("A", arrow.uint8), arrow.field("B", arrow.uint16)]); >> schema2 = arrow.schema([arrow.field("A", arrow.uint8), arrow.field("B", arrow.uint16)]); >> schema3 = arrow.schema([arrow.field("A", arrow.uint8)]); >> isequal(schema1, schema2) ans = logical 1 >> isequal(schema1, schema3) ans = logical 0 ``` ### Future Directions 1. #37570 * Closes: #37568 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
take |
kevingurney
pushed a commit
that referenced
this issue
Sep 8, 2023
…atch` MATLAB class (#37627) ### Rationale for this change Following on to #37474, #37446, and #37525, we should implement `isequal` for the `arrow.tabular.RecordBatch` MATLAB class. ### What changes are included in this PR? 1. Implemented `isequal` method for `arrow.tabular.RecordBatch` ### Are these changes tested? Yes. Added `isequal` unit tests to `tRecordBatch.m`. ### Are there any user-facing changes? Yes, users can now use `isequal` to compare `arrow.tabular.RecordBatch`es. **Example** ```matlab >> t1 = table(1, "A", false, VariableNames=["Number", "String", "Logical"]); >> t2 = table([1; 2], ["A"; "B"], [false; false], VariableNames=["Number", "String", "Logical"]); >> rb1 = arrow.recordBatch(t1); >> rb2 = arrow.recordBatch(t2); >> rb3 = arrow.recordBatch(t1); >> isequal(rb1, rb2) ans = logical 0 >> isequal(rb1, rb3) ans = logical 1 ``` ### Future Directions 1. #37628 * Closes: #37570 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
loicalleyne
pushed a commit
to loicalleyne/arrow
that referenced
this issue
Nov 13, 2023
…d` MATLAB class (apache#37617) ### Rationale for this change Following on to apache#37474, apache#37446, and apache#37525, we should implement `isequal` for the `arrow.type.Field` MATLAB class. ### What changes are included in this PR? 1. Implemented the `isequal` method for `arrow.type.Field` ### Are these changes tested? Yes. Add new unit tests to `tField.m` ### Are there any user-facing changes? Yes. Users can now call `isequal` on `arrow.type.Field`s to determine if two fields are equal. **Example** ```matlab >> f1 = arrow.field("A", arrow.time32(TimeUnit="Second")); >> f2 = arrow.field("B", arrow.time32(TimeUnit="Second")); >> f3 = arrow.field("A", arrow.time32(TimeUnit="Millisecond")); >> isequal(f1, f1) ans = logical 1 % Name properties differ >> isequal(f1, f2) ans = logical 0 % Type properties differ >> isequal(f1, f3) ans = logical 0 ``` ### Future Directions 1. apache#37568 2. apache#37570 * Closes: apache#37569 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
loicalleyne
pushed a commit
to loicalleyne/arrow
that referenced
this issue
Nov 13, 2023
…chema` MATLAB class (apache#37619) ### Rationale for this change Following on to apache#37474, apache#37446, and apache#37525, we should implement `isequal` for the `arrow.tabular.Schema` MATLAB class. ### What changes are included in this PR? 1. Updated `arrow.tabular.Schema` class to inherit from `matlab.mixin.Scalar`. 2. Added `isequal` method to `arrow.tabular.Schema`. ### Are these changes tested? Yes. Added `isequal` unit tests to `tSchema.m` ### Are there any user-facing changes? Yes. Users can now compare two `arrow.tabular.Schema` objects via `isequal`. **Example** ```matlab >> schema1 = arrow.schema([arrow.field("A", arrow.uint8), arrow.field("B", arrow.uint16)]); >> schema2 = arrow.schema([arrow.field("A", arrow.uint8), arrow.field("B", arrow.uint16)]); >> schema3 = arrow.schema([arrow.field("A", arrow.uint8)]); >> isequal(schema1, schema2) ans = logical 1 >> isequal(schema1, schema3) ans = logical 0 ``` ### Future Directions 1. apache#37570 * Closes: apache#37568 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
loicalleyne
pushed a commit
to loicalleyne/arrow
that referenced
this issue
Nov 13, 2023
…ecordBatch` MATLAB class (apache#37627) ### Rationale for this change Following on to apache#37474, apache#37446, and apache#37525, we should implement `isequal` for the `arrow.tabular.RecordBatch` MATLAB class. ### What changes are included in this PR? 1. Implemented `isequal` method for `arrow.tabular.RecordBatch` ### Are these changes tested? Yes. Added `isequal` unit tests to `tRecordBatch.m`. ### Are there any user-facing changes? Yes, users can now use `isequal` to compare `arrow.tabular.RecordBatch`es. **Example** ```matlab >> t1 = table(1, "A", false, VariableNames=["Number", "String", "Logical"]); >> t2 = table([1; 2], ["A"; "B"], [false; false], VariableNames=["Number", "String", "Logical"]); >> rb1 = arrow.recordBatch(t1); >> rb2 = arrow.recordBatch(t2); >> rb3 = arrow.recordBatch(t1); >> isequal(rb1, rb2) ans = logical 0 >> isequal(rb1, rb3) ans = logical 1 ``` ### Future Directions 1. apache#37628 * Closes: apache#37570 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this issue
Feb 19, 2024
…d` MATLAB class (apache#37617) ### Rationale for this change Following on to apache#37474, apache#37446, and apache#37525, we should implement `isequal` for the `arrow.type.Field` MATLAB class. ### What changes are included in this PR? 1. Implemented the `isequal` method for `arrow.type.Field` ### Are these changes tested? Yes. Add new unit tests to `tField.m` ### Are there any user-facing changes? Yes. Users can now call `isequal` on `arrow.type.Field`s to determine if two fields are equal. **Example** ```matlab >> f1 = arrow.field("A", arrow.time32(TimeUnit="Second")); >> f2 = arrow.field("B", arrow.time32(TimeUnit="Second")); >> f3 = arrow.field("A", arrow.time32(TimeUnit="Millisecond")); >> isequal(f1, f1) ans = logical 1 % Name properties differ >> isequal(f1, f2) ans = logical 0 % Type properties differ >> isequal(f1, f3) ans = logical 0 ``` ### Future Directions 1. apache#37568 2. apache#37570 * Closes: apache#37569 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this issue
Feb 19, 2024
…chema` MATLAB class (apache#37619) ### Rationale for this change Following on to apache#37474, apache#37446, and apache#37525, we should implement `isequal` for the `arrow.tabular.Schema` MATLAB class. ### What changes are included in this PR? 1. Updated `arrow.tabular.Schema` class to inherit from `matlab.mixin.Scalar`. 2. Added `isequal` method to `arrow.tabular.Schema`. ### Are these changes tested? Yes. Added `isequal` unit tests to `tSchema.m` ### Are there any user-facing changes? Yes. Users can now compare two `arrow.tabular.Schema` objects via `isequal`. **Example** ```matlab >> schema1 = arrow.schema([arrow.field("A", arrow.uint8), arrow.field("B", arrow.uint16)]); >> schema2 = arrow.schema([arrow.field("A", arrow.uint8), arrow.field("B", arrow.uint16)]); >> schema3 = arrow.schema([arrow.field("A", arrow.uint8)]); >> isequal(schema1, schema2) ans = logical 1 >> isequal(schema1, schema3) ans = logical 0 ``` ### Future Directions 1. apache#37570 * Closes: apache#37568 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this issue
Feb 19, 2024
…ecordBatch` MATLAB class (apache#37627) ### Rationale for this change Following on to apache#37474, apache#37446, and apache#37525, we should implement `isequal` for the `arrow.tabular.RecordBatch` MATLAB class. ### What changes are included in this PR? 1. Implemented `isequal` method for `arrow.tabular.RecordBatch` ### Are these changes tested? Yes. Added `isequal` unit tests to `tRecordBatch.m`. ### Are there any user-facing changes? Yes, users can now use `isequal` to compare `arrow.tabular.RecordBatch`es. **Example** ```matlab >> t1 = table(1, "A", false, VariableNames=["Number", "String", "Logical"]); >> t2 = table([1; 2], ["A"; "B"], [false; false], VariableNames=["Number", "String", "Logical"]); >> rb1 = arrow.recordBatch(t1); >> rb2 = arrow.recordBatch(t2); >> rb3 = arrow.recordBatch(t1); >> isequal(rb1, rb2) ans = logical 0 >> isequal(rb1, rb3) ans = logical 1 ``` ### Future Directions 1. apache#37628 * Closes: apache#37570 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the enhancement requested
Following on to #37474, #37446, and #37525, we should implement
isequal
for thearrow.tabular.RecordBatch
MATLAB class.Component(s)
MATLAB
The text was updated successfully, but these errors were encountered: