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-37045: [MATLAB] Implement featherwrite in terms of arrow.internal.io.feather.Writer #37047

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

sgilmore10
Copy link
Member

@sgilmore10 sgilmore10 commented Aug 7, 2023

Rationale for this change

Now that #37043 is merged, we can re-implement featherwrite in terms of the new arrow.internal.io.feather.Writer class. Once this change is made, we can delete the legacy build infrastructure and featherwrite MEX code.

What changes are included in this PR?

  1. Re-implemented featherwrite using arrow.internal.io.feather.Writer.

Are these changes tested?

  1. Yes, the existing tests in tfeather.m cover these changes.
  2. I had to update some of the expected error message IDs in tfeather.m because the new implementation throws errors with different IDs.
  3. featherwrite used to export the real part of MATLAB complex numeric arrays. The new version of featherwrite now errors if the input table contains complex data because feather/Arrow itself does not support complex numeric data. We think this is the right decision. Writing out only the real part is lossy.

Are there any user-facing changes?

Yes, featherwrite no longer supports writing complex numeric arrays.

Future Directions

  1. Once this PR is merged, we will remove the legacy build infrastructure and MEX code.

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!

@kevingurney
Copy link
Member

+1

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Aug 7, 2023
@sgilmore10
Copy link
Member Author

Lint failure is unrelated to the changes in this PR.

@kevingurney kevingurney merged commit e90c316 into apache:main Aug 7, 2023
10 of 11 checks passed
@kevingurney kevingurney removed the awaiting merge Awaiting merge label Aug 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 e90c316.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

kevingurney added a commit that referenced this pull request Aug 16, 2023
…de (#37204)

### Rationale for this change

Now that `featherread` and `featherwrite` have been re-implemented in terms of the new MATLAB Interface APIs (#37163 and #37047), we can remove the unused feather V1 MEX infrastructure and code. 

### What changes are included in this PR?

1. Deleted the following source and header files that are specific to the feather V1 MEX implementation: 
    - `arrow/matlab/src/cpp/arrow/matlab/feather/feather_functions.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/feather_reader.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/feather_writer.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/matlab_traits.h`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/util/handle_status.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/util/unicode_conversion.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/mex/call.cc`
    - `arrow/matlab/src/cpp/arrow/matlab/mex/mex_functions.h`
    - `arrow/matlab/src/cpp/arrow/matlab/mex/mex_util.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/mex/mex_util_test.cc`
    - `arrow/matlab/src/cpp/arrow/matlab/api/visibility.h`

2. Deleted the following feather V1 MEX-specific build infrastructure files: 
    - `arrow/matlab/build_support/common_vars.m`
    - `arrow/matlab/build_support/compile.m`
    - `arrow/matlab/build_support/test.m`

3. Removed all feather V1 MEX-specific logic from the `arrow/matlab/CMakeLists.txt` file.

### Are these changes tested?

No tests are needed. The old feather V1 MEX specific implementation is unused code.

### Are there any user-facing changes?

No.

### Future Directions

1. Review the back-log of stale tasks/issues that are no longer actionable and close them. For example, #27758 has already been implemented and submitted with a different issue attached. 
* Closes: #37203

Lead-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Co-authored-by: Kevin Gurney <kgurney@mathworks.com>
Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
@sgilmore10 sgilmore10 deleted the GH-37045 branch August 21, 2023 18:12
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…ernal.io.feather.Writer (apache#37047)

### Rationale for this change

Now that apache#37043 is merged, we can re-implement `featherwrite` in terms of the new `arrow.internal.io.feather.Writer` class. Once this change is made, we can delete the legacy build infrastructure and featherwrite MEX code. 

### What changes are included in this PR?

1. Re-implemented `featherwrite` using `arrow.internal.io.feather.Writer`. 

### Are these changes tested?

1. Yes, the existing tests in `tfeather.m` cover these changes.
2. I had to update some of the expected error message IDs in `tfeather.m` because the new implementation throws errors with different IDs. 
3. `featherwrite` used to export the real part of MATLAB complex numeric arrays. The new version of `featherwrite` now errors if the input table contains complex data because feather/Arrow itself does not support complex numeric data. We think this is the right decision. Writing out only the real part is lossy.

### Are there any user-facing changes?

Yes, `featherwrite` no longer supports writing complex numeric arrays.

### Future Directions

1. Once this PR is merged, we will remove the legacy build infrastructure and MEX code. 
* Closes: apache#37045

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 pull request Nov 13, 2023
…and code (apache#37204)

### Rationale for this change

Now that `featherread` and `featherwrite` have been re-implemented in terms of the new MATLAB Interface APIs (apache#37163 and apache#37047), we can remove the unused feather V1 MEX infrastructure and code. 

### What changes are included in this PR?

1. Deleted the following source and header files that are specific to the feather V1 MEX implementation: 
    - `arrow/matlab/src/cpp/arrow/matlab/feather/feather_functions.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/feather_reader.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/feather_writer.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/matlab_traits.h`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/util/handle_status.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/feather/util/unicode_conversion.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/mex/call.cc`
    - `arrow/matlab/src/cpp/arrow/matlab/mex/mex_functions.h`
    - `arrow/matlab/src/cpp/arrow/matlab/mex/mex_util.[cc][h]`
    - `arrow/matlab/src/cpp/arrow/matlab/mex/mex_util_test.cc`
    - `arrow/matlab/src/cpp/arrow/matlab/api/visibility.h`

2. Deleted the following feather V1 MEX-specific build infrastructure files: 
    - `arrow/matlab/build_support/common_vars.m`
    - `arrow/matlab/build_support/compile.m`
    - `arrow/matlab/build_support/test.m`

3. Removed all feather V1 MEX-specific logic from the `arrow/matlab/CMakeLists.txt` file.

### Are these changes tested?

No tests are needed. The old feather V1 MEX specific implementation is unused code.

### Are there any user-facing changes?

No.

### Future Directions

1. Review the back-log of stale tasks/issues that are no longer actionable and close them. For example, apache#27758 has already been implemented and submitted with a different issue attached. 
* Closes: apache#37203

Lead-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Co-authored-by: Kevin Gurney <kgurney@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 featherwrite in terms of arrow.internal.io.feather.Writer
2 participants