kou opened a new pull request, #43705: URL: https://github.com/apache/arrow/pull/43705
### Rationale for this change If we can attach associated statistics to an array, we can use it in later processes such as query planning. ### What changes are included in this PR? New public APIs: * `arrow::Array::statistics()`: It returns the associated statistics. It can't be changed after an array is created. A sliced array doesn't have parent array's statistics because parent array's statistics isn't valid for sliced array. * Add new optional `arrow::ArrayStatistics` argument to all `arrow::*Array(ArrayData)` constructors: `arrow::*Array(ArrayData, ArrayStatistics = NULLPTR)` New internal APIs: * `arrow::Array::Init()`: All array constructors must call this to attach `arrow::ArrayData` and `arrow::ArrayStatistics`. Note that calling this via parent's constructor isn't allowed. Array constructors don't need to call `arrow::Array::SetData()` directly. It's called in `arrow::Array::Init()`. * `arrow::Array::SetStatitics()`: It attaches `arrow::ArrayStatistics` to `arrow::Array`. In general, this is not called directly. This is called from `arrow::Array::Init()` internally. Changed internal APIs: * `arrow::Array::SetData()`: It becomes a virtual method. So `arrow::Array::Init()` must be called by each array's constructor. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. **This PR includes breaking changes to public APIs.** APIs are compatible but ABIs are incompatible. -- 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]
