[scn] fix failure of mittest after refresh feature scn
This commit is contained in:
@ -20,7 +20,6 @@
|
||||
#include "sql/engine/ob_serializable_function.h"
|
||||
#include "objit/common/ob_item_type.h"
|
||||
#include "sql/engine/ob_bit_vector.h"
|
||||
#include "common/ob_common_utility.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
@ -256,7 +255,7 @@ public:
|
||||
// Can not use allocator for expression result. (ObExpr::get_str_res_mem() is used for result).
|
||||
common::ObArenaAllocator &tmp_alloc_;
|
||||
ObDatumCaster *datum_caster_;
|
||||
bool &tmp_alloc_used_;
|
||||
bool tmp_alloc_used_;
|
||||
private:
|
||||
int64_t batch_idx_;
|
||||
int64_t batch_size_;
|
||||
@ -460,8 +459,6 @@ public:
|
||||
return OBJ_DATUM_STRING == obj_datum_map_;
|
||||
};
|
||||
|
||||
inline bool is_const_expr() const { return is_static_const_ || is_dynamic_const_; }
|
||||
|
||||
// Evaluate all parameters, assign the first sizeof...(args) parameters to %args.
|
||||
//
|
||||
// e.g.:
|
||||
@ -572,7 +569,6 @@ private:
|
||||
char *alloc_str_res_mem(ObEvalCtx &ctx, const int64_t size, const int64_t idx) const;
|
||||
// reset datums pointer to reserved buffer.
|
||||
void reset_datums_ptr(char *frame, const int64_t size) const;
|
||||
void reset_datum_ptr(char *frame, const int64_t size, const int64_t idx) const;
|
||||
int eval_one_datum_of_batch(ObEvalCtx &ctx, common::ObDatum *&datum) const;
|
||||
int do_eval_batch(ObEvalCtx &ctx, const ObBitVector &skip, const int64_t size) const;
|
||||
|
||||
@ -611,7 +607,6 @@ public:
|
||||
uint64_t is_static_const_:1; // is const during the whole execution
|
||||
uint64_t is_boolean_:1; // to distinguish result of this expr between and int tc
|
||||
uint64_t is_dynamic_const_:1; // is const during the subplan execution, including exec param
|
||||
uint64_t need_stack_check_:1; // the expression tree depth needs to check whether the stack overflows
|
||||
};
|
||||
uint64_t flag_;
|
||||
};
|
||||
@ -978,6 +973,7 @@ OB_INLINE int ObExpr::eval(ObEvalCtx &ctx, common::ObDatum *&datum) const
|
||||
OB_ASSERT(NULL != frame);
|
||||
datum = (ObDatum *)(frame + datum_off_);
|
||||
ObEvalInfo *eval_info = (ObEvalInfo *)(frame + eval_info_off_);
|
||||
|
||||
if (is_batch_result()) {
|
||||
if (NULL == eval_func_ || eval_info->projected_) {
|
||||
datum = datum + ctx.get_batch_idx();
|
||||
@ -986,18 +982,14 @@ OB_INLINE int ObExpr::eval(ObEvalCtx &ctx, common::ObDatum *&datum) const
|
||||
}
|
||||
} else if (NULL != eval_func_ && !eval_info->evaluated_) {
|
||||
// do nothing for const/column reference expr or already evaluated expr
|
||||
if (OB_UNLIKELY(need_stack_check_) && OB_FAIL(check_stack_overflow())) {
|
||||
SQL_LOG(WARN, "failed to check stack overflow", K(ret));
|
||||
if (datum->ptr_ != frame + res_buf_off_) {
|
||||
datum->ptr_ = frame + res_buf_off_;
|
||||
}
|
||||
ret = eval_func_(*this, ctx, *datum);
|
||||
if (OB_LIKELY(common::OB_SUCCESS == ret)) {
|
||||
eval_info->evaluated_ = true;
|
||||
} else {
|
||||
if (datum->ptr_ != frame + res_buf_off_) {
|
||||
datum->ptr_ = frame + res_buf_off_;
|
||||
}
|
||||
ret = eval_func_(*this, ctx, *datum);
|
||||
if (OB_LIKELY(common::OB_SUCCESS == ret)) {
|
||||
eval_info->evaluated_ = true;
|
||||
} else {
|
||||
datum->set_null();
|
||||
}
|
||||
datum->set_null();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user