kevingurney commented on code in PR #37215: URL: https://github.com/apache/arrow/pull/37215#discussion_r1297364338
########## matlab/README.md: ########## @@ -205,20 +209,417 @@ arrowArray = ] ``` +### Arrow `RecordBatch` class + +#### Create an Arrow `RecordBatch` from a MATLAB `table` + +```matlab +>> matlabTable = table(["A"; "B"; "C"], [1; 2; 3], [true; false; true]) + +matlabTable = + + 3x3 table + + Var1 Var2 Var3 + ____ ____ _____ + + "A" 1 true + "B" 2 false + "C" 3 true + +>> arrowRecordBatch = arrow.recordbatch(matlabTable) Review Comment: Thanks for the suggestion, @kou. That's a good point. We originally went with all lowercase for "consistency" with the other top-level `arrow.*` functions (e.g. `arrow.field`, `arrow.array`, `arrow.schema`, etc.). However, we realize that `recordBatch` is technically the first "two word" function in this space. As you alluded to, other APIs (e.g. pyarrow) don't use all lowercase for two word functions (e.g. `pyarrow.record_batch` rather than `pyarrow.recordbatch`). `snake_case` is not the convention typically used by MATLAB code, so using `lowerCamelCase` makes sense for `recordBatch`. I've captured this in #37222. We will follow up with a PR to make this change. Thank you! ########## matlab/README.md: ########## @@ -205,20 +209,417 @@ arrowArray = ] ``` +### Arrow `RecordBatch` class + +#### Create an Arrow `RecordBatch` from a MATLAB `table` + +```matlab +>> matlabTable = table(["A"; "B"; "C"], [1; 2; 3], [true; false; true]) + +matlabTable = + + 3x3 table + + Var1 Var2 Var3 + ____ ____ _____ + + "A" 1 true + "B" 2 false + "C" 3 true + +>> arrowRecordBatch = arrow.recordbatch(matlabTable) Review Comment: Marking this as resolved. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
