[refactor](functioncontext) remove function context impl class (#17715)

* [refactor](functioncontext) remove function context impl class


Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
yiguolei
2023-03-14 11:21:45 +08:00
committed by GitHub
parent 3a97190661
commit 77ab2fac20
17 changed files with 146 additions and 238 deletions

View File

@ -23,7 +23,7 @@
#include "common/status.h"
#include "fmt/format.h"
#include "fmt/ranges.h"
#include "udf/udf_internal.h"
#include "udf/udf.h"
#include "vec/data_types/data_type_nullable.h"
#include "vec/data_types/data_type_number.h"
#include "vec/functions/function_java_udf.h"

View File

@ -385,7 +385,7 @@ Status VExpr::init_function_context(VExprContext* context,
RETURN_IF_ERROR(c->get_const_col(context, &const_col));
constant_cols.push_back(const_col);
}
fn_ctx->impl()->set_constant_cols(constant_cols);
fn_ctx->set_constant_cols(constant_cols);
}
if (scope == FunctionContext::FRAGMENT_LOCAL) {

View File

@ -25,7 +25,7 @@
#include "exprs/hybrid_set.h"
#include "gen_cpp/Exprs_types.h"
#include "runtime/types.h"
#include "udf/udf_internal.h"
#include "udf/udf.h"
#include "vec/data_types/data_type.h"
#include "vec/exprs/vexpr_context.h"
#include "vec/functions/function.h"

View File

@ -17,7 +17,7 @@
#include "vec/exprs/vexpr_context.h"
#include "udf/udf_internal.h"
#include "udf/udf.h"
#include "util/stack_util.h"
#include "vec/exprs/vexpr.h"
@ -76,7 +76,7 @@ doris::Status VExprContext::clone(RuntimeState* state, VExprContext** new_ctx) {
*new_ctx = state->obj_pool()->add(new VExprContext(_root));
for (auto& _fn_context : _fn_contexts) {
(*new_ctx)->_fn_contexts.push_back(_fn_context->impl()->clone());
(*new_ctx)->_fn_contexts.push_back(_fn_context->clone());
}
(*new_ctx)->_is_clone = true;
@ -88,16 +88,15 @@ doris::Status VExprContext::clone(RuntimeState* state, VExprContext** new_ctx) {
void VExprContext::clone_fn_contexts(VExprContext* other) {
for (auto& _fn_context : _fn_contexts) {
other->_fn_contexts.push_back(_fn_context->impl()->clone());
other->_fn_contexts.push_back(_fn_context->clone());
}
}
int VExprContext::register_function_context(RuntimeState* state,
const doris::TypeDescriptor& return_type,
const std::vector<doris::TypeDescriptor>& arg_types) {
_fn_contexts.push_back(FunctionContextImpl::create_context(state, return_type, arg_types));
_fn_contexts.back()->impl()->set_check_overflow_for_decimal(
state->check_overflow_for_decimal());
_fn_contexts.push_back(FunctionContext::create_context(state, return_type, arg_types));
_fn_contexts.back()->set_check_overflow_for_decimal(state->check_overflow_for_decimal());
return _fn_contexts.size() - 1;
}