MCPcopy Create free account
hub / github.com/apache/impala / GetBooleanValInterpreted

Method GetBooleanValInterpreted

be/src/exprs/compound-predicates.cc:31–42  ·  view source on GitHub ↗

(<> && false) is false, (true && NULL) is NULL

Source from the content-addressed store, hash-verified

29
30// (<> && false) is false, (true && NULL) is NULL
31BooleanVal AndPredicate::GetBooleanValInterpreted(
32 ScalarExprEvaluator* eval, const TupleRow* row) const {
33 DCHECK_EQ(children_.size(), 2);
34 BooleanVal val1 = children_[0]->GetBooleanVal(eval, row);
35 if (!val1.is_null && !val1.val) return BooleanVal(false); // short-circuit
36
37 BooleanVal val2 = children_[1]->GetBooleanVal(eval, row);
38 if (!val2.is_null && !val2.val) return BooleanVal(false);
39
40 if (val1.is_null || val2.is_null) return BooleanVal::null();
41 return BooleanVal(true);
42}
43
44string AndPredicate::DebugString() const {
45 stringstream out;

Callers

nothing calls this directly

Calls 3

BooleanValClass · 0.85
GetBooleanValMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected