sgilmore10 opened a new pull request, #37025:
URL: https://github.com/apache/arrow/pull/37025

   ### Rationale for this change
   For parity with how `arrow.array.Array` objects are constructed, we should 
create a construction function called `arrow.recordbatch()` for 
`arrow.tabular.RecordBatch`:
   
   ```matlab
   >> t = table(["A"; "B"; "C"], [1; 2; 3])
   
   t =
   
     3×2 table
   
       Var1    Var2
       ____    ____
   
       "A"      1  
       "B"      2  
       "C"      3  
   
   >> rb = arrow.recordbatch(t)
   
   rb = 
   
   Var1:   [
       "A",
       "B",
       "C"
     ]
   Var2:   [
       1,
       2,
       3
     ]
   
   >> class(rb)
   
   
   ans =
   
       'arrow.tabular.RecordBatch'
   ```
   
   The `arrow.tabular.RecordBatch` constructor will accept a scalar 
`libmexclass.proxy.Proxy` object instead of a MATLAB `table`.
   
   ### What changes are included in this PR?
   
   1. Added the convenience constructor function  `arrow.recordbatch()`. I 
accepts a `table` as input.
   2. Modified `arrow.tabular.RecordBatch`'s constructor to expect a scalar 
`libmexclass.proxy.Proxy` object as input instead of a `table`.
   
   
   ### Are these changes tested?
   Yes, updated the test cases in `tRecordBatch.m` to use the new convenience 
constructor  `arrow.recordbatch()` .
   
   
   ### Are there any user-facing changes?
   
   Yes, users will now have to use `arrow.recordbatch()` when constructing a 
record batch from a MATLAB `table` instead of  `arrow.tabular.RecordBatch`'s 
constructor.
   


-- 
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]

Reply via email to