Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -2218,10 +2218,8 @@ int ObSqlParameterization::transform_minus_op(ObIAllocator &alloc, ParseNode *tr
// select 1 - (2/3/4) from dual;
// 对于常量节点2,都不能转换成-2
// do nothing
} else if (ob_is_number_or_decimal_int_tc(ITEM_TO_OBJ_TYPE(tree->children_[1]->type_))
|| ((ob_is_integer_type(ITEM_TO_OBJ_TYPE(tree->children_[1]->type_))
|| ob_is_real_type(ITEM_TO_OBJ_TYPE(tree->children_[1]->type_)))
&& tree->children_[1]->value_ >= 0)) {
} else if (ob_is_numeric_type(ITEM_TO_OBJ_TYPE(tree->children_[1]->type_)) &&
tree->children_[1]->value_ >= 0) {
ParseNode *child = tree->children_[1];
tree->type_ = T_OP_ADD;
if (!is_from_pl) {
@ -2251,7 +2249,8 @@ int ObSqlParameterization::transform_minus_op(ObIAllocator &alloc, ParseNode *tr
} else {
child->is_trans_from_minus_ = 1;
}
} else if (T_OP_MUL == tree->children_[1]->type_ || T_OP_DIV == tree->children_[1]->type_
} else if (T_OP_MUL == tree->children_[1]->type_
|| T_OP_DIV == tree->children_[1]->type_
|| T_OP_INT_DIV == tree->children_[1]->type_
|| (lib::is_mysql_mode() && T_OP_MOD == tree->children_[1]->type_)) {
/* '0 - 2 * 3' should be transformed to '0 + (-2) * 3' */