| 46 | node.tuple_is_null_pred.tuple_ids.end()) {} |
| 47 | |
| 48 | Status 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'. |
nothing calls this directly
no test coverage detected