reformat source code
according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
@ -21,10 +21,10 @@ namespace sql {
|
||||
class ObExprDllUdf;
|
||||
|
||||
class ObUdfCtxMgr {
|
||||
private:
|
||||
private:
|
||||
static const int64_t BUKET_NUM = 100;
|
||||
|
||||
public:
|
||||
public:
|
||||
ObUdfCtxMgr() : allocator_(common::ObModIds::OB_SQL_UDF), ctxs_()
|
||||
{}
|
||||
~ObUdfCtxMgr();
|
||||
@ -37,11 +37,11 @@ class ObUdfCtxMgr {
|
||||
}
|
||||
int reset();
|
||||
|
||||
private:
|
||||
private:
|
||||
common::ObArenaAllocator allocator_;
|
||||
common::hash::ObHashMap<uint64_t, ObNormalUdfExeUnit*, common::hash::NoPthreadDefendMode> ctxs_;
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
DISALLOW_COPY_AND_ASSIGN(ObUdfCtxMgr);
|
||||
};
|
||||
|
||||
@ -33,7 +33,7 @@ class ObPhysicalPlanCtx;
|
||||
class obUdfConstArgs;
|
||||
class ObUdfFunction;
|
||||
class ObUdfUtil {
|
||||
public:
|
||||
public:
|
||||
/*
|
||||
* for example, if the defined func named 'my_udf_add', we wanna load the auxiliary function.
|
||||
* then we use 'my_udf_add_init' 'my_udf_add_deinit' 'my_udf_add_clear' or 'my_udf_add_add' to load
|
||||
@ -49,7 +49,7 @@ class ObUdfUtil {
|
||||
(UDF_DECIMAL_BUFF_LENGTH * 9); /* the number of digits that my_decimal can possibly contain */
|
||||
static const int UDF_DECIMAL_MAX_STR_LENGTH = (UDF_DECIMAL_MAX_POSSIBLE_PRECISION + 2);
|
||||
|
||||
public:
|
||||
public:
|
||||
enum load_function_type {
|
||||
UDF_ORIGIN,
|
||||
UDF_INIT,
|
||||
@ -63,7 +63,7 @@ class ObUdfUtil {
|
||||
return load_function_postfix[type];
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
/*
|
||||
* calc udf's result type
|
||||
* */
|
||||
|
||||
@ -72,7 +72,7 @@ class ObSqlExpression;
|
||||
struct ObUdfConstArgs {
|
||||
OB_UNIS_VERSION_V(1);
|
||||
|
||||
public:
|
||||
public:
|
||||
ObUdfConstArgs() : sql_calc_(nullptr), idx_in_udf_arg_(common::OB_INVALID_INDEX){};
|
||||
virtual ~ObUdfConstArgs() = default;
|
||||
ObUdfConstArgs& operator=(const ObUdfConstArgs& other)
|
||||
@ -87,10 +87,10 @@ struct ObUdfConstArgs {
|
||||
};
|
||||
|
||||
class ObUdfFunction {
|
||||
private:
|
||||
private:
|
||||
static const int OB_MYSQL_ERRMSG_SIZE = 512;
|
||||
|
||||
public:
|
||||
public:
|
||||
friend class ObGetUdfFunctor;
|
||||
friend class ObResetUdfFunctor;
|
||||
friend class ObForceDelUdfFunctor;
|
||||
@ -101,7 +101,7 @@ class ObUdfFunction {
|
||||
UDF_DEINIT,
|
||||
};
|
||||
class ObUdfCtx {
|
||||
public:
|
||||
public:
|
||||
ObUdfCtx() : state_(UDF_UNINITIALIZED), udf_init_(), udf_args_()
|
||||
{}
|
||||
virtual ~ObUdfCtx() = default;
|
||||
@ -110,7 +110,7 @@ class ObUdfFunction {
|
||||
ObUdfArgs udf_args_;
|
||||
};
|
||||
|
||||
public:
|
||||
public:
|
||||
ObUdfFunction()
|
||||
: udf_meta_(),
|
||||
dlhandle_(nullptr),
|
||||
@ -127,7 +127,7 @@ class ObUdfFunction {
|
||||
virtual int process_init_func(ObUdfFunction::ObUdfCtx& udf_ctx) const;
|
||||
virtual void process_deinit_func(ObUdfFunction::ObUdfCtx& udf_ctx) const;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
share::schema::ObUDFMeta udf_meta_;
|
||||
ObUdfSoHandler dlhandle_;
|
||||
ObUdfFuncAny func_origin_;
|
||||
@ -139,8 +139,8 @@ class ObUdfFunction {
|
||||
};
|
||||
|
||||
class ObNormalUdfFunction : public ObUdfFunction {
|
||||
private:
|
||||
public:
|
||||
private:
|
||||
public:
|
||||
ObNormalUdfFunction() = default;
|
||||
virtual ~ObNormalUdfFunction() = default;
|
||||
int process_origin_func(common::ObObj& result, const common::ObObj* objs_stack, int64_t param_num,
|
||||
@ -148,8 +148,8 @@ class ObNormalUdfFunction : public ObUdfFunction {
|
||||
};
|
||||
|
||||
class ObAggUdfFunction : public ObUdfFunction {
|
||||
private:
|
||||
public:
|
||||
private:
|
||||
public:
|
||||
ObAggUdfFunction() = default;
|
||||
virtual ~ObAggUdfFunction() = default;
|
||||
|
||||
@ -164,7 +164,7 @@ class ObAggUdfFunction : public ObUdfFunction {
|
||||
class ObAggUdfMeta {
|
||||
OB_UNIS_VERSION_V(1);
|
||||
|
||||
public:
|
||||
public:
|
||||
ObAggUdfMeta() : udf_meta_(), udf_attributes_(), udf_attributes_types_(), calculable_results_()
|
||||
{}
|
||||
explicit ObAggUdfMeta(const share::schema::ObUDFMeta& meta)
|
||||
@ -180,7 +180,7 @@ class ObAggUdfMeta {
|
||||
};
|
||||
|
||||
class ObAggUdfExeUnit {
|
||||
public:
|
||||
public:
|
||||
ObAggUdfExeUnit(ObAggUdfFunction* agg_func, ObUdfFunction::ObUdfCtx* udf_ctx) : agg_func_(agg_func), udf_ctx_(udf_ctx)
|
||||
{}
|
||||
ObAggUdfExeUnit() : agg_func_(nullptr), udf_ctx_(nullptr)
|
||||
@ -191,7 +191,7 @@ class ObAggUdfExeUnit {
|
||||
};
|
||||
|
||||
class ObNormalUdfExeUnit {
|
||||
public:
|
||||
public:
|
||||
ObNormalUdfExeUnit(ObNormalUdfFunction* normal_func, ObUdfFunction::ObUdfCtx* udf_ctx)
|
||||
: normal_func_(normal_func), udf_ctx_(udf_ctx)
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user