Commit 4eca507
apacheGH-49684: [MATLAB] Introduce deprecation warnings for "legacy" Feather V1 functions
### Rationale for this change
In response to apache#49231 and https://lists.apache.org/thread/1npvnhjb1xwz09zh8vnd079zt2q4o08l, this pull request introduces deprecation warnings for the public MATLAB `featherread` and `featherwrite` APIs that allow reading and writing "legacy" Feather V1 files.
The solution of introducing deprecation warnings follows the pyarrow approach proposed in apache#49590.
**Examples**
`featherread`
```matlab
>> featherread("out.feather")
Warning: Reading from Feather V1 files is deprecated. Use arrow.io.ipc.RecordBatchFileReader to read from Feather V2 (Arrow IPC) files.
> In featherread (line 30)
```
`featherwrite`
```matlab
>> featherwrite("out.feather", array2table(1))
Warning: Writing to Feather V1 files is deprecated. Use arrow.io.ipc.RecordBatchFileWriter to write to Feather V2 (Arrow IPC) files.
> In featherread (line 31)
```
### What changes are included in this PR?
1. Introduced a new warning with identifier `arrow:io:feather:v1:FeatherWriteDeprecated` when calling `featherwrite.m`.
2. Introduced a new warning with identifier `arrow:io:feather:v1:FeatherReadDeprecated` when calling `featherread.m`.
### Are these changes tested?
Yes.
1. Updated `matlab/test/tfeather.m` to suppress `featherread` and `featherwrite` deprecation warnings.
2. Added two new test cases to `tfeather.m`: `VerifyFeatherReadDeprecationWarning` and `VerifyFeatherWriteDeprecationWarning`. These test cases verify that the expected deprecation warnings are issued as expected.
3. Updated `matlab/test/arrow/io/feather/tRoundTrip.m` to suppress `featherread` deprecation warnings.
### Are there any user-facing changes?
Yes.
1. The `featherread` and `featherwrite` functions are user-facing. With these changes, deprecation warnings will be displayed when invoking either of these functions. **Note**: these warnings can be turned off in MATLAB by calling ` warning("off", "arrow:io:feather:v1:FeatherWriteDeprecated")` and `warning("off", "arrow:io:feather:v1:FeatherReadDeprecated")`.
### Future Directions
1. We may want to consider moving `featherread` and `featherwrite` into a package like `arrow.io.feather.v1.*` to mirror the rest of the mlarrow APIs. Alternatively, we could consider removing these functions entirely.
### Notes
1. Thank you @ sgilmore10 for your help with this pull request!
* GitHub Issue: apache#49684
Lead-authored-by: Kevin Gurney <[email protected]>
Co-authored-by: Sarah Gilmore <[email protected]>
Signed-off-by: Kevin Gurney <[email protected]>featherread and featherwrite (apache#49705)1 parent 47053cc commit 4eca507
File tree
4 files changed
+45
-0
lines changed- matlab
- src/matlab
- test
- arrow/io/feather
4 files changed
+45
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
267 | 273 | | |
268 | 274 | | |
269 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
270 | 299 | | |
271 | 300 | | |
272 | 301 | | |
| |||
0 commit comments