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

Method Init

be/src/exprs/hive-udf-call.cc:162–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162Status HiveUdfCall::Init(
163 const RowDescriptor& row_desc, bool is_entry_point, FragmentState* state) {
164 // Initialize children first.
165 RETURN_IF_ERROR(ScalarExpr::Init(row_desc, is_entry_point, state));
166
167 // Initialize input_byte_offsets_ and input_buffer_size_
168 for (int i = 0; i < GetNumChildren(); ++i) {
169 input_byte_offsets_.push_back(input_buffer_size_);
170 input_buffer_size_ += GetChild(i)->type().GetSlotSize();
171 // Align all values up to 8 bytes. We don't care about footprint since we allocate
172 // one buffer for all rows and we never copy the entire buffer.
173 input_buffer_size_ = BitUtil::RoundUpNumBytes(input_buffer_size_) * 8;
174 is_constant_arg_.push_back(GetChild(i)->is_constant());
175 }
176 return Status::OK();
177}
178
179Status HiveUdfCall::OpenEvaluator(FunctionContext::FunctionStateScope scope,
180 RuntimeState* state, ScalarExprEvaluator* eval) const {

Callers

nothing calls this directly

Calls 5

OKFunction · 0.85
push_backMethod · 0.80
GetSlotSizeMethod · 0.80
typeMethod · 0.45
is_constantMethod · 0.45

Tested by

no test coverage detected