Skip to content

Commit 4829b94

Browse files
jnthntatumcopybara-github
authored andcommitted
Remove special error for null select target.
Just return the general invalid select target error. PiperOrigin-RevId: 899816955
1 parent 0253936 commit 4829b94

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

eval/eval/select_step.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "eval/eval/direct_expression_step.h"
2020
#include "eval/eval/evaluator_core.h"
2121
#include "eval/eval/expression_step_base.h"
22-
#include "eval/internal/errors.h"
2322
#include "internal/status_macros.h"
2423
#include "runtime/runtime_options.h"
2524
#include "google/protobuf/arena.h"
@@ -158,13 +157,6 @@ absl::Status SelectStep::Evaluate(ExecutionFrame* frame) const {
158157
result_trail = trail.Step(&field_);
159158
}
160159

161-
if (arg->Is<NullValue>()) {
162-
frame->value_stack().PopAndPush(
163-
cel::ErrorValue(cel::runtime_internal::CreateError("Message is NULL")),
164-
std::move(result_trail));
165-
return absl::OkStatus();
166-
}
167-
168160
absl::optional<OptionalValue> optional_arg;
169161

170162
if (enable_optional_types_ && arg.IsOptional()) {
@@ -354,10 +346,6 @@ class DirectSelectStep : public DirectExpressionStep {
354346
case ValueKind::kStruct:
355347
case ValueKind::kMap:
356348
break;
357-
case ValueKind::kNull:
358-
result = cel::ErrorValue(
359-
cel::runtime_internal::CreateError("Message is NULL"));
360-
return absl::OkStatus();
361349
default:
362350
if (optional_arg) {
363351
break;

0 commit comments

Comments
 (0)