| 193 | } |
| 194 | |
| 195 | Status HdfsScanner::InitializeWriteTuplesFn(HdfsPartitionDescriptor* partition, |
| 196 | THdfsFileFormat::type type, const string& scanner_name) { |
| 197 | if (!scan_node_->tuple_desc()->string_slots().empty() |
| 198 | && partition->escape_char() != '\0') { |
| 199 | // Codegen currently doesn't emit call to MemPool::TryAllocate() so skip codegen if |
| 200 | // there are strings slots and we need to compact (i.e. copy) the data. |
| 201 | scan_node_->IncNumScannersCodegenDisabled(); |
| 202 | return Status::OK(); |
| 203 | } |
| 204 | |
| 205 | write_tuples_fn_ = scan_node_->GetCodegenFn(type); |
| 206 | if (write_tuples_fn_ == NULL) { |
| 207 | scan_node_->IncNumScannersCodegenDisabled(); |
| 208 | return Status::OK(); |
| 209 | } |
| 210 | VLOG(2) << scanner_name << "(node_id=" << scan_node_->id() |
| 211 | << ") using llvm codegend functions."; |
| 212 | scan_node_->IncNumScannersCodegenEnabled(); |
| 213 | return Status::OK(); |
| 214 | } |
| 215 | |
| 216 | Status HdfsScanner::CommitRows(int num_rows, RowBatch* row_batch) { |
| 217 | DCHECK_LE(num_rows, row_batch->capacity() - row_batch->num_rows()); |
nothing calls this directly
no test coverage detected