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

Method Make

cpp/src/arrow/array/array_run_end.cc:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44Result<std::shared_ptr<RunEndEncodedArray>> RunEndEncodedArray::Make(
45 const std::shared_ptr<DataType>& type, int64_t logical_length,
46 const std::shared_ptr<Array>& run_ends, const std::shared_ptr<Array>& values,
47 int64_t logical_offset) {
48 if (type->id() != Type::RUN_END_ENCODED) {
49 return Status::Invalid("Type must be RUN_END_ENCODED");
50 }
51 const auto* ree_type = internal::checked_cast<const RunEndEncodedType*>(type.get());
52 RETURN_NOT_OK(ree_util::ValidateRunEndEncodedChildren(
53 *ree_type, logical_length, run_ends->data(), values->data(), 0, logical_offset));
54 return std::make_shared<RunEndEncodedArray>(type, logical_length, run_ends, values,
55 logical_offset);
56}
57
58Result<std::shared_ptr<RunEndEncodedArray>> RunEndEncodedArray::Make(
59 int64_t logical_length, const std::shared_ptr<Array>& run_ends,

Callers

nothing calls this directly

Calls 8

run_end_encodedFunction · 0.85
MakeFunction · 0.70
InvalidFunction · 0.50
idMethod · 0.45
getMethod · 0.45
dataMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected