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

Method RowBatch

be/src/runtime/row-batch.cc:45–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43const int RowBatch::FIXED_LEN_BUFFER_LIMIT;
44
45RowBatch::RowBatch(const RowDescriptor* row_desc, int capacity, MemTracker* mem_tracker)
46 : num_rows_(0),
47 capacity_(capacity),
48 flush_mode_(FlushMode::NO_FLUSH_RESOURCES),
49 needs_deep_copy_(false),
50 num_tuples_per_row_(row_desc->tuple_descriptors().size()),
51 tuple_ptrs_size_(capacity * num_tuples_per_row_ * sizeof(Tuple*)),
52 attached_buffer_bytes_(0),
53 tuple_data_pool_(mem_tracker),
54 row_desc_(row_desc),
55 mem_tracker_(mem_tracker) {
56 DCHECK(mem_tracker_ != NULL);
57 DCHECK_GT(capacity, 0);
58 DCHECK_GT(tuple_ptrs_size_, 0);
59 // TODO: switch to Init() pattern so we can check memory limit and return Status.
60 mem_tracker_->Consume(tuple_ptrs_size_);
61 tuple_ptrs_ = reinterpret_cast<Tuple**>(malloc(tuple_ptrs_size_));
62 DCHECK(tuple_ptrs_ != NULL);
63}
64
65RowBatch::RowBatch(const RowDescriptor* row_desc, const OutboundRowBatch& input_batch,
66 MemTracker* mem_tracker)

Callers

nothing calls this directly

Calls 8

headerMethod · 0.80
num_tuples_per_rowMethod · 0.80
TupleOffsetsAsSliceMethod · 0.80
TupleDataAsSliceMethod · 0.80
sizeMethod · 0.45
ConsumeMethod · 0.45
num_rowsMethod · 0.45
AllocateMethod · 0.45

Tested by

no test coverage detected