From 53b6accc716e6e9c3085da5cb7f34f8850acac47 Mon Sep 17 00:00:00 2001 From: CEL Dev Team Date: Sun, 2 Aug 2026 22:45:03 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 958160367 --- tools/proto_to_predicate.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/proto_to_predicate.cc b/tools/proto_to_predicate.cc index 8c89ee2f0..fd1e9e8a6 100644 --- a/tools/proto_to_predicate.cc +++ b/tools/proto_to_predicate.cc @@ -429,8 +429,14 @@ class ProtoToPredicateBuilder final : private ExprFactory { Expr field_path = NewSelect(NextId(), base_expr, field->name()); CEL_RETURN_IF_ERROR(Walk(sub_message, field_path, predicates)); } else { - // Primitive field: base_expr.field == - Expr field_path = NewSelect(NextId(), base_expr, field->name()); + // Primitive field: base_expr.field == or match_path == + Expr field_path; + std::string match_path_val = GetMatchPath(field); + if (!match_path_val.empty()) { + field_path = ParseAndBuildPath(match_path_val); + } else { + field_path = NewSelect(NextId(), base_expr, field->name()); + } predicates.push_back( ConstructEquality(std::move(field_path), PrimitiveToExpr(message, reflection, field)));