| 160 | } |
| 161 | |
| 162 | Status 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 | |
| 179 | Status HiveUdfCall::OpenEvaluator(FunctionContext::FunctionStateScope scope, |
| 180 | RuntimeState* state, ScalarExprEvaluator* eval) const { |
nothing calls this directly
no test coverage detected