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


##########
matlab/src/cpp/arrow/matlab/tabular/proxy/record_batch.cc:
##########
@@ -18,17 +18,42 @@
 #include "libmexclass/proxy/ProxyManager.h"
 
 #include "arrow/matlab/array/proxy/array.h"
+#include "arrow/matlab/array/proxy/wrap.h"
+
 #include "arrow/matlab/error/error.h"
 #include "arrow/matlab/tabular/proxy/record_batch.h"
 #include "arrow/type.h"
 #include "arrow/util/utf8.h"
 
+#include "libmexclass/proxy/ProxyManager.h"
+#include "libmexclass/error/Error.h"
+
+#include <sstream>
+
 namespace arrow::matlab::tabular::proxy {
 
+    namespace {
+        libmexclass::error::Error make_empty_record_batch_error() {
+            const std::string error_msg =  "Numeric indexing using the column 
method is not supported for record batches with no columns.";
+            return 
libmexclass::error::Error{error::RECORD_BATCH_NUMERIC_INDEX_WITH_EMPTY_RECORD_BATCH,
 error_msg};
+        }
+
+        libmexclass::error::Error make_invalid_numeric_index_error(const 
int32_t matlab_index, const int32_t num_columns) {
+            std::stringstream error_message_stream;
+            error_message_stream << "Invalid column index: ";
+            error_message_stream << matlab_index;
+            error_message_stream << ". Column index must be between 1 and the 
number of fields (";

Review Comment:
   thanks for noticing this.



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