sgilmore10 commented on code in PR #37475:
URL: https://github.com/apache/arrow/pull/37475#discussion_r1310732596


##########
matlab/src/matlab/+arrow/+tabular/RecordBatch.m:
##########
@@ -54,13 +54,17 @@
         function arrowArray = column(obj, idx)
             import arrow.internal.validate.*
 
-            idx = index.numeric(idx, "int32");
-            % TODO: Consider vectorizing column() in the future to support
-            % extracting multiple columns at once.
-            validateattributes(idx, "int32", "scalar");
-
-            args = struct(Index=idx);
-            [proxyID, typeID] = obj.Proxy.getColumnByIndex(args);              
  
+            idx = index.numericOrString(idx, "int32");
+
+            if isnumeric(idx)
+                validateattributes(idx, "int32", "scalar");

Review Comment:
   On second thought, we should enhance the `index.numericOrString` function to 
accept a `AcceptNonScalar` name-value pair that defaults to `true`.



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