kiszk commented on a change in pull request #7507: URL: https://github.com/apache/arrow/pull/7507#discussion_r538208202
########## File path: cpp/src/arrow/array/util.cc ########## @@ -84,6 +283,12 @@ std::shared_ptr<Array> MakeArray(const std::shared_ptr<ArrayData>& data) { return out; } +void SwapEndianArrayData(std::shared_ptr<ArrayData>& data) { + internal::ArrayDataEndianSwapper swapper_visitor(data, data->length); + DCHECK_OK(VisitTypeInline(*data->type, &swapper_visitor)); + DCHECK_OK(swapper_visitor.SwapChildren((*data->type).fields())); Review comment: @wesm I just keep this code as-is. This is because `SwapChildren()` is also called from`SwapType()`. Any comments are appreciated. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org