MCPcopy Create free account
hub / github.com/apache/arrow / GetScalar

Method GetScalar

cpp/src/arrow/chunked_array.cc:167–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167Result<std::shared_ptr<Scalar>> ChunkedArray::GetScalar(int64_t index) const {
168 const auto loc = chunk_resolver_.Resolve(index);
169 if (loc.chunk_index >= static_cast<int64_t>(chunks_.size())) {
170 return Status::IndexError("index with value of ", index,
171 " is out-of-bounds for chunked array of length ", length_);
172 }
173 return chunks_[loc.chunk_index]->GetScalar(loc.index_in_chunk);
174}
175
176std::shared_ptr<ChunkedArray> ChunkedArray::Slice(int64_t offset, int64_t length) const {
177 ARROW_CHECK_LE(offset, length_) << "Slice offset greater than array length";

Callers 8

TEST_FFunction · 0.45
GetEncodedValueMethod · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
Array__GetScalarFunction · 0.45

Calls 3

IndexErrorFunction · 0.85
ResolveMethod · 0.45
sizeMethod · 0.45

Tested by 6

TEST_FFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36