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

Method InitializeWriteTuplesFn

be/src/exec/hdfs-scanner.cc:195–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195Status 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
216Status HdfsScanner::CommitRows(int num_rows, RowBatch* row_batch) {
217 DCHECK_LE(num_rows, row_batch->capacity() - row_batch->num_rows());

Callers

nothing calls this directly

Calls 8

OKFunction · 0.85
GetCodegenFnMethod · 0.80
emptyMethod · 0.45
tuple_descMethod · 0.45
escape_charMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected