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


##########
matlab/src/cpp/arrow/matlab/type/proxy/field.cc:
##########
@@ -0,0 +1,129 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "arrow/util/utf8.h"
+
+#include "arrow/matlab/type/proxy/field.h"
+#include "arrow/matlab/error/error.h"
+
+#include "arrow/matlab/type/proxy/primitive_ctype.h"
+#include "arrow/matlab/type/proxy/timestamp_type.h"
+#include "arrow/matlab/type/proxy/string_type.h"
+
+#include "libmexclass/proxy/ProxyManager.h"
+
+namespace arrow::matlab::type::proxy {
+
+    Field::Field(std::shared_ptr<arrow::Field> field) : 
field{std::move(field)} {
+        REGISTER_METHOD(Field, name);
+        REGISTER_METHOD(Field, type);
+        REGISTER_METHOD(Field, toString);
+    }
+
+    std::shared_ptr<arrow::Field> Field::unwrap() {
+        return field;
+    }
+
+    void Field::name(libmexclass::proxy::method::Context& context) {
+        namespace mda = ::matlab::data;
+        mda::ArrayFactory factory;
+
+        const auto str_utf8 = field->name();

Review Comment:
   It turns out that `name` actually does return a `const std::string&`. I just 
didn't include the `&` on the output variable type. Fixed.



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