Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cpp/src/arrow/chunked_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@ class ARROW_EXPORT ChunkedArray {
/// \return the total number of nulls among all chunks
int64_t null_count() const { return null_count_; }

/// \return the total number of chunks in the chunked array
int num_chunks() const { return static_cast<int>(chunks_.size()); }

/// \return chunk a particular chunk from the chunked array
std::shared_ptr<Array> chunk(int i) const { return chunks_[i]; }

/// \return an ArrayVector of chunks
const ArrayVector& chunks() const { return chunks_; }

/// \brief Construct a zero-copy slice of the chunked array with the
Expand Down Expand Up @@ -139,6 +141,7 @@ class ARROW_EXPORT ChunkedArray {
/// there are zero chunks
Result<std::shared_ptr<ChunkedArray>> View(const std::shared_ptr<DataType>& type) const;

/// \brief Return the type of the chunked array
const std::shared_ptr<DataType>& type() const { return type_; }

/// \brief Return a Scalar containing the value of this array at index
Expand Down