nevi-me commented on a change in pull request #9329: URL: https://github.com/apache/arrow/pull/9329#discussion_r597200305
########## 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: @yordan-pavlov I think it's safer to deprecate `data()`, then remove it later. We still use it a lot in the codebase, but it's often more performant to use `array_ref()`, so returning `ArrayData` doesn't guide users on a faster path. -- 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