Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Attach arrow::ArrayStatistics to arrow::Array #43666

Closed
kou opened this issue Aug 13, 2024 · 1 comment
Closed

[C++] Attach arrow::ArrayStatistics to arrow::Array #43666

kou opened this issue Aug 13, 2024 · 1 comment

Comments

@kou
Copy link
Member

kou commented Aug 13, 2024

Describe the enhancement requested

GH-41909 introduced arrow::ArrayStatitstics but it's not associated with arrow::Array.

This issue attaches arrow::ArrayStatistics to arrow::Array.

See also:

Component(s)

C++

kou added a commit to kou/arrow that referenced this issue Aug 15, 2024
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.
@kou
Copy link
Member Author

kou commented Sep 3, 2024

We've attached to ArrayData not Array: #43797

@kou kou closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant