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

Method ExtractSubplan

eval/compiler/flat_expr_builder_extensions.cc:406–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406absl::StatusOr<ExecutionPath> PlannerContext::ExtractSubplan(
407 const cel::Expr& node) {
408 auto* subexpression = program_builder_.GetSubexpression(&node);
409 if (subexpression == nullptr) {
410 return absl::InternalError(
411 "attempted to update program step for untracked expr node");
412 }
413
414 subexpression->Flatten();
415
416 ExecutionPath out;
417 subexpression->ExtractTo(out);
418
419 return out;
420}
421
422absl::Status PlannerContext::ReplaceSubplan(const cel::Expr& node,
423 ExecutionPath path) {

Callers 1

TEST_FFunction · 0.80

Calls 2

ExtractToMethod · 0.80
FlattenMethod · 0.45

Tested by 1

TEST_FFunction · 0.64