Skip to content
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-37568: [MATLAB] Implement isequal for the arrow.tabular.Schema MATLAB class #37619

Merged
merged 5 commits into from
Sep 7, 2023

Conversation

sgilmore10
Copy link
Member

@sgilmore10 sgilmore10 commented Sep 7, 2023

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

>> 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. [MATLAB] Implement isequal for the arrow.tabular.RecordBatch MATLAB class #37570

Copy link
Member

@kevingurney kevingurney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Sep 7, 2023
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Sep 7, 2023
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Sep 7, 2023
@kevingurney
Copy link
Member

+1

@kevingurney kevingurney merged commit cdc95c2 into apache:main Sep 7, 2023
9 checks passed
@kevingurney kevingurney deleted the GH-37568 branch September 7, 2023 21:06
@kevingurney kevingurney removed the awaiting merge Awaiting merge label Sep 7, 2023
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit cdc95c2.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request 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>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MATLAB] Implement isequal for the arrow.tabular.Schema MATLAB class
2 participants