MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / ListFlatten

Function ListFlatten

extensions/lists_functions.cc:211–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211absl::StatusOr<Value> ListFlatten(
212 const ListValue& list, int64_t depth,
213 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
214 google::protobuf::MessageFactory* absl_nonnull message_factory,
215 google::protobuf::Arena* absl_nonnull arena) {
216 if (depth < 0) {
217 return ErrorValue(
218 absl::InvalidArgumentError("flatten(): level must be non-negative"));
219 }
220 auto builder = NewListValueBuilder(arena);
221 CEL_RETURN_IF_ERROR(ListFlattenImpl(list, depth, descriptor_pool,
222 message_factory, arena, builder.get()));
223 return std::move(*builder).Build();
224}
225
226absl::StatusOr<ListValue> ListRange(
227 int64_t end, const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,

Callers 1

Calls 4

ErrorValueFunction · 0.85
ListFlattenImplFunction · 0.85
getMethod · 0.45
BuildMethod · 0.45

Tested by

no test coverage detected