kevingurney commented on code in PR #36419: URL: https://github.com/apache/arrow/pull/36419#discussion_r1256162650
########## matlab/src/cpp/arrow/matlab/type/proxy/type.h: ########## @@ -0,0 +1,43 @@ +// 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. + +#pragma once + +#include "arrow/type.h" + +#include "libmexclass/proxy/Proxy.h" + +namespace arrow::matlab::type::proxy { + +class Type : public libmexclass::proxy::Proxy { + public: + Type(std::shared_ptr<arrow::DataType> type); + + virtual ~Type() {} + + std::shared_ptr<arrow::DataType> getType(); Review Comment: Since we are going to likely have similar "getter" methods for other concrete `Proxy` subclasses in the future, maybe we should pick a more generic name like `"unwrap"` here to keep things more consistent across the code base. I believe this is the [pattern followed by `pyarrow`](https://github.com/apache/arrow/issues/36429). ########## matlab/src/cpp/arrow/matlab/type/proxy/type.cc: ########## @@ -0,0 +1,50 @@ +// 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/matlab/type/proxy/type.h" + +namespace arrow::matlab::type::proxy { + + Type::Type(std::shared_ptr<arrow::DataType> type) : data_type{type} { + // Register Proxy methods. Review Comment: We can probably remove this comment now since we have been following this pattern across the code base for a while now. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org