Skip to content

Commit

Permalink
GH-44590: [C++] Add const and & to arrow::Array::statistics() r…
Browse files Browse the repository at this point in the history
…eturn type (#44592)

### Rationale for this change

It must be immutable.

### What changes are included in this PR?

Add missing `const` and `&`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.

**This PR includes breaking changes to public APIs.**
* GitHub Issue: #44590

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored Oct 31, 2024
1 parent 191472d commit e1fa7e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/array/array_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ class ARROW_EXPORT Array {
/// This just delegates to calling statistics on the underlying ArrayData
/// object which backs this Array.
///
/// \return const ArrayStatistics&
std::shared_ptr<ArrayStatistics> statistics() const { return data_->statistics; }
/// \return const std::shared_ptr<ArrayStatistics>&
const std::shared_ptr<ArrayStatistics>& statistics() const { return data_->statistics; }

protected:
Array() = default;
Expand Down

0 comments on commit e1fa7e5

Please sign in to comment.