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

Method CreateTupleRow

be/src/util/tuple-row-compare-test.cc:99–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98 template <bool IS_FIRST_SLOT_NULL = false, typename... Args>
99 TupleRow* CreateTupleRow(Args... args) {
100 // Only one null byte is allocated, so the joint slot size has to be < sizeof(int)*8.
101 DCHECK_LE(sizeof...(args), 8);
102 uint8_t* tuple_row_mem = expr_perm_pool_.Allocate(
103 sizeof(char*) + sizeof(int32_t*) * sizeof...(args));
104 Tuple* tuple_mem = Tuple::Create(sizeof(char) + GetSize(args...), &expr_perm_pool_);
105 if (IS_FIRST_SLOT_NULL) tuple_mem->SetNull(NullIndicatorOffset(0, 1));
106 FillMem(tuple_mem, 1, args...);
107 TupleRow* row = reinterpret_cast<TupleRow*>(tuple_row_mem);
108 row->SetTuple(0, tuple_mem);
109 return row;
110 }
111
112 unsigned GetSize() { return 0; }
113

Callers

nothing calls this directly

Calls 5

CreateClass · 0.85
NullIndicatorOffsetClass · 0.85
SetNullMethod · 0.80
AllocateMethod · 0.45
SetTupleMethod · 0.45

Tested by

no test coverage detected