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

Function ExpectedRangesToArray

cpp/src/arrow/util/byte_size_test.cc:122–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120};
121
122std::shared_ptr<Array> ExpectedRangesToArray(
123 const std::vector<ExpectedRange>& ranges,
124 const std::function<uint64_t(const ExpectedRange&)>& key_func) {
125 UInt64Builder builder;
126 for (const auto& range : ranges) {
127 ARROW_EXPECT_OK(builder.Append(key_func(range)));
128 }
129 std::shared_ptr<Array> arr;
130 ARROW_EXPECT_OK(builder.Finish(&arr));
131 return arr;
132}
133
134std::shared_ptr<Array> RangesToOffsets(const std::vector<ExpectedRange>& ranges) {
135 return ExpectedRangesToArray(ranges,

Callers 2

RangesToOffsetsFunction · 0.85
RangesToLengthsFunction · 0.85

Calls 2

AppendMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected