fix the problem of performance degradation for add expression

This commit is contained in:
obdev 2024-04-10 17:20:03 +00:00 committed by ob-robot
parent 2588795598
commit 0e96deaa6a

View File

@ -177,7 +177,8 @@ struct ObDoArithVectorBaseEval
ResVector *res_vec = static_cast<ResVector *>(expr.get_vector(ctx));
ObBitVector &eval_flags = expr.get_evaluated_flags(ctx);
const int64_t cond =
(bound.get_all_rows_active() << 2) | (expr.get_eval_info(ctx).evaluated_ << 1) | all_not_null;
//(bound.get_all_rows_active() << 2) | (expr.get_eval_info(ctx).evaluated_ << 1) | all_not_null;
(bound.get_all_rows_active() << 2) | all_not_null;
if (cond == 4) { // all_rows_active == true, evaluated = false, all_not_null = false
for (int64_t idx = bound.start(); OB_SUCC(ret) && idx < bound.end(); ++idx) {
ret = ArithOp::null_check_vector_op(*res_vec, *left_vec, *right_vec, idx, args...);
@ -222,7 +223,8 @@ struct ObDoArithFixedVectorEval
ObBitVector &eval_flags = expr.get_evaluated_flags(ctx);
const int64_t cond = (ArithOp::is_raw_op_supported() << 3) | (bound.get_all_rows_active() << 2)
| (expr.get_eval_info(ctx).evaluated_ << 1) | all_not_null;
//| (expr.get_eval_info(ctx).evaluated_ << 1) | all_not_null;
| all_not_null;
// 1101: row_op_support = true, all_rows_active == true, evaluated = false, all_not_null = true
if (cond == 13) {
for (int64_t idx = bound.start(); idx < bound.end(); ++idx) {
@ -268,7 +270,8 @@ struct ObDoArithFixedConstVectorEval
ObBitVector &eval_flags = expr.get_evaluated_flags(ctx);
const int cond = (ArithOp::is_raw_op_supported() << 3) | (bound.get_all_rows_active() << 2)
| (expr.get_eval_info(ctx).evaluated_ << 1) | all_not_null;
//| (expr.get_eval_info(ctx).evaluated_ << 1) | all_not_null;
| all_not_null;
// 1101: row_op_support = true, all_rows_active == true, evaluated = false, all_not_null = true
if (cond == 13) {
for (int64_t idx = bound.start(); idx < bound.end(); ++idx) {
@ -314,7 +317,8 @@ struct ObDoArithConstFixedVectorEval
ObBitVector &eval_flags = expr.get_evaluated_flags(ctx);
const int cond = (ArithOp::is_raw_op_supported() << 3) | (bound.get_all_rows_active() << 2)
| (expr.get_eval_info(ctx).evaluated_ << 1) | all_not_null;
//| (expr.get_eval_info(ctx).evaluated_ << 1) | all_not_null;
| all_not_null;
// 1101: row_op_support = true, all_rows_active == true, evaluated = false, all_not_null = true
if (cond == 13) {
for (int64_t idx = bound.start(); idx < bound.end(); ++idx) {