Skip to content

Commit ad3b476

Browse files
jnthntatumcopybara-github
authored andcommitted
Update protobuf type adapter to support select optimization through map and repeated fields.
PiperOrigin-RevId: 583536280
1 parent 114bee6 commit ad3b476

7 files changed

Lines changed: 1005 additions & 72 deletions

File tree

eval/public/cel_options.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@ struct InterpreterOptions {
148148
// This assumes that the type information at check time agrees with the
149149
// configured types at runtime.
150150
//
151-
// Important: The select optimization ignores
152-
// `enable_empty_wrapper_null_unboxing` and always operates as though it is
153-
// `true`.
151+
// Important: The select optimization follows spec behavior for traversals.
152+
// - `enable_empty_wrapper_null_unboxing` is ignored and optimized traversals
153+
// always operates as though it is `true`.
154+
// - `enable_heterogeneous_equality` is ignored and optimized traversals
155+
// always operate as though it is `true`.
154156
//
155157
// Note: implementation in progress -- please consult the CEL team before
156158
// enabling in an existing environment.

eval/public/structs/BUILD

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,21 +239,30 @@ cc_library(
239239
":field_access_impl",
240240
":legacy_type_adapter",
241241
":legacy_type_info_apis",
242+
"//base:attributes",
243+
"//base:builtins",
242244
"//base:data",
243245
"//base:memory",
246+
"//common:kind",
244247
"//eval/public:cel_options",
245248
"//eval/public:cel_value",
246249
"//eval/public:message_wrapper",
247250
"//eval/public/containers:internal_field_backed_list_impl",
248251
"//eval/public/containers:internal_field_backed_map_impl",
249252
"//extensions/protobuf:memory_manager",
253+
"//extensions/protobuf/internal:map_reflection",
250254
"//internal:casts",
251255
"//internal:no_destructor",
256+
"//internal:overloaded",
252257
"//internal:status_macros",
253258
"//runtime:runtime_options",
259+
"//runtime/internal:errors",
260+
"@com_google_absl//absl/base:nullability",
261+
"@com_google_absl//absl/log:absl_check",
254262
"@com_google_absl//absl/status",
255263
"@com_google_absl//absl/status:statusor",
256264
"@com_google_absl//absl/strings",
265+
"@com_google_absl//absl/types:optional",
257266
"@com_google_absl//absl/types:span",
258267
"@com_google_absl//absl/types:variant",
259268
"@com_google_protobuf//:protobuf",
@@ -269,7 +278,6 @@ cc_test(
269278
":proto_message_type_adapter",
270279
"//base:attributes",
271280
"//base:data",
272-
"//eval/public:cel_options",
273281
"//eval/public:cel_value",
274282
"//eval/public:message_wrapper",
275283
"//eval/public/containers:container_backed_list_impl",
@@ -280,7 +288,6 @@ cc_test(
280288
"//internal:proto_matchers",
281289
"//internal:testing",
282290
"//runtime:runtime_options",
283-
"//testutil:util",
284291
"@com_google_absl//absl/status",
285292
"@com_google_protobuf//:protobuf",
286293
],

0 commit comments

Comments
 (0)