fix not-equal row expr extract wrong query range bug
This commit is contained in:
		| @ -2358,13 +2358,9 @@ int ObQueryRange::pre_extract_ne_op(const ObOpRawExpr *t_expr, | ||||
|     const ObRawExpr *l_expr = t_expr->get_param_expr(0); | ||||
|     const ObRawExpr *r_expr = t_expr->get_param_expr(1); | ||||
|     ObKeyPartList key_part_list; | ||||
|     if (lib::is_oracle_mode() | ||||
|       && T_OP_ROW == l_expr->get_expr_type() && T_OP_ROW == r_expr->get_expr_type()) { | ||||
|       if (1 == r_expr->get_param_count() | ||||
|           && T_OP_ROW == r_expr->get_param_expr(0)->get_expr_type()) { | ||||
|         r_expr = r_expr->get_param_expr(0); | ||||
|       } | ||||
|     } | ||||
|     if (T_OP_ROW == l_expr->get_expr_type() && T_OP_ROW == r_expr->get_expr_type()) { | ||||
|       GET_ALWAYS_TRUE_OR_FALSE(true, out_key_part); | ||||
|     } else { | ||||
|       for (int i = 0; OB_SUCC(ret) && i < 2; ++i) { | ||||
|         query_range_ctx_->cur_expr_is_precise_ = false; | ||||
|         ObKeyPart *tmp = NULL; | ||||
| @ -2392,6 +2388,7 @@ int ObQueryRange::pre_extract_ne_op(const ObOpRawExpr *t_expr, | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| @ -3289,7 +3286,7 @@ int ObQueryRange::pre_extract_not_in_op(const ObOpRawExpr *b_expr, | ||||
|              OB_ISNULL(r_expr = static_cast<const ObOpRawExpr *>(b_expr->get_param_expr(1)))) { | ||||
|     ret = OB_ERR_UNEXPECTED; | ||||
|     LOG_WARN("r_expr is null.", K(ret)); | ||||
|   } else if (r_expr->get_param_count() > MAX_NOT_IN_SIZE) { | ||||
|   } else if (r_expr->get_param_count() > MAX_NOT_IN_SIZE || l_expr->get_expr_type() == T_OP_ROW) { | ||||
|     // do not extract range over MAX_NOT_IN_SIZE | ||||
|     GET_ALWAYS_TRUE_OR_FALSE(true, out_key_part); | ||||
|     query_range_ctx_->cur_expr_is_precise_ = false; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Larry955
					Larry955