kou commented on code in PR #36485:
URL: https://github.com/apache/arrow/pull/36485#discussion_r1253768929
##########
matlab/src/cpp/arrow/matlab/array/proxy/timestamp_array.cc:
##########
@@ -49,7 +49,8 @@ namespace arrow::matlab::array::proxy {
const mda::TypedArray<mda::MATLABString> units_mda =
opts[0]["TimeUnit"];
// extract the time zone string
- MATLAB_ASSIGN_OR_ERROR(const auto timezone,
arrow::util::UTF16StringToUTF8(timezone_mda[0]),
+ const std::u16string u16_timezone = timezone_mda[0];
Review Comment:
I don't know the type of `timezone_mda[0]` but does this cause a copy?
Can we use `std::u16string_view` here?
```cpp
std::u16string_view u16_timezone(timezone_mda[0]);
```
--
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]