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

Method Init

be/src/exprs/tuple-is-null-predicate.cc:48–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 node.tuple_is_null_pred.tuple_ids.end()) {}
47
48Status TupleIsNullPredicate::Init(
49 const RowDescriptor& row_desc, bool is_entry_point, FragmentState* state) {
50 RETURN_IF_ERROR(ScalarExpr::Init(row_desc, is_entry_point, state));
51 DCHECK_EQ(0, children_.size());
52 // Resolve tuple ids to tuple indexes.
53 for (int i = 0; i < tuple_ids_.size(); ++i) {
54 int32_t tuple_idx = row_desc.GetTupleIdx(tuple_ids_[i]);
55 if (tuple_idx == RowDescriptor::INVALID_IDX) {
56 // This should not happen and indicates a planner issue. This code is tricky
57 // so rather than crashing, do this as a stop gap.
58 // TODO: remove this code and replace with DCHECK.
59 return Status("Invalid plan. TupleIsNullPredicate has invalid tuple idx.");
60 }
61 if (row_desc.TupleIsNullable(tuple_idx)) tuple_idxs_.push_back(tuple_idx);
62 }
63 return Status::OK();
64}
65
66/// For sample IR, see 'FillCodegendComputeFnConstantFalse' and
67/// 'FillCodegendComputeFnNonConstant'.

Callers

nothing calls this directly

Calls 6

OKFunction · 0.85
TupleIsNullableMethod · 0.80
push_backMethod · 0.80
StatusClass · 0.70
sizeMethod · 0.45
GetTupleIdxMethod · 0.45

Tested by

no test coverage detected