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


##########
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:
   That's a good point. I've captured this in #37477.



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

Reply via email to