| 237 | } |
| 238 | |
| 239 | int HdfsScanner::WriteTemplateTuples(TupleRow* row, int num_tuples) { |
| 240 | DCHECK_GE(num_tuples, 0); |
| 241 | DCHECK_EQ(scan_node_->materialized_slots().size(), 0); |
| 242 | int num_to_commit = 0; |
| 243 | if (LIKELY(conjunct_evals_->size() == 0)) { |
| 244 | num_to_commit = num_tuples; |
| 245 | } else { |
| 246 | TupleRow template_tuple_row; |
| 247 | template_tuple_row.SetTuple(0, template_tuple_); |
| 248 | // Evaluate any conjuncts which may reference the partition columns. |
| 249 | for (int i = 0; i < num_tuples; ++i) { |
| 250 | if (EvalConjuncts(&template_tuple_row)) ++num_to_commit; |
| 251 | } |
| 252 | } |
| 253 | Tuple** row_tuple = reinterpret_cast<Tuple**>(row); |
| 254 | if (template_tuple_ != nullptr) { |
| 255 | for (int i = 0; i < num_to_commit; ++i) row_tuple[i] = template_tuple_; |
| 256 | } else { |
| 257 | DCHECK_EQ(scan_node_->tuple_desc()->byte_size(), 0); |
| 258 | // IMPALA-6258: Initialize tuple ptrs to non-null value |
| 259 | for (int i = 0; i < num_to_commit; ++i) row_tuple[i] = Tuple::POISON; |
| 260 | } |
| 261 | return num_to_commit; |
| 262 | } |
| 263 | |
| 264 | bool HdfsScanner::WriteCompleteTuple(MemPool* pool, FieldLocation* fields, |
| 265 | Tuple* tuple, TupleRow* tuple_row, Tuple* template_tuple, |
nothing calls this directly
no test coverage detected