nevi-me commented on a change in pull request #9329: URL: https://github.com/apache/arrow/pull/9329#discussion_r582556952
########## File path: rust/arrow/src/array/array.rs ########## @@ -56,11 +55,13 @@ pub trait Array: fmt::Debug + Send + Sync + JsonEqual { /// ``` fn as_any(&self) -> &Any; - /// Returns a reference-counted pointer to the underlying data of this array. - fn data(&self) -> ArrayDataRef; + /// Returns a reference to the underlying data of this array. + fn data(&self) -> &ArrayData; Review comment: I understand why we wanted to avoid `Array::data().clone()` to get `ArrayData`, but with these 2 functions returning the same reference, I'd opt to make `Array::data() -> ArrayData` ---------------------------------------------------------------- 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