| 214 | } |
| 215 | |
| 216 | Status HdfsScanner::CommitRows(int num_rows, RowBatch* row_batch) { |
| 217 | DCHECK_LE(num_rows, row_batch->capacity() - row_batch->num_rows()); |
| 218 | row_batch->CommitRows(num_rows); |
| 219 | tuple_mem_ += static_cast<int64_t>(scan_node_->tuple_desc()->byte_size()) * num_rows; |
| 220 | tuple_ = reinterpret_cast<Tuple*>(tuple_mem_); |
| 221 | if (context_->cancelled()) return Status::CancelledInternal("HDFS scanner"); |
| 222 | // Check for UDF errors. |
| 223 | RETURN_IF_ERROR(state_->GetQueryStatus()); |
| 224 | // Clear expr result allocations for this thread to avoid accumulating too much |
| 225 | // memory from evaluating the scanner conjuncts. |
| 226 | context_->expr_results_pool()->Clear(); |
| 227 | return Status::OK(); |
| 228 | } |
| 229 | |
| 230 | int HdfsScanner::WriteAlignedTuplesCodegenOrInterpret(MemPool* pool, |
| 231 | TupleRow* tuple_row_mem, FieldLocation* fields, int num_tuples, |