fix subplan filter bug

This commit is contained in:
Larry955
2022-11-13 02:19:18 +08:00
committed by wangzelin.wzl
parent 4c5f2470b8
commit 96afe7bb8a
2 changed files with 11 additions and 11 deletions

View File

@ -22,9 +22,9 @@
using namespace oceanbase::common; using namespace oceanbase::common;
namespace oceanbase namespace oceanbase
{ {
namespace sql namespace sql
{ {
ObExprToOutfileRow::ObExprToOutfileRow(ObIAllocator &alloc) ObExprToOutfileRow::ObExprToOutfileRow(ObIAllocator &alloc)
: ObStringExprOperator(alloc, T_OP_TO_OUTFILE_ROW, N_TO_OUTFILE_ROW, MORE_THAN_ZERO, INTERNAL_IN_MYSQL_MODE) : ObStringExprOperator(alloc, T_OP_TO_OUTFILE_ROW, N_TO_OUTFILE_ROW, MORE_THAN_ZERO, INTERNAL_IN_MYSQL_MODE)
@ -111,9 +111,9 @@ int ObExprToOutfileRow::extend_buffer(ObExprOutFileInfo &out_info,
} }
int ObExprToOutfileRow::calc_outfile_info(const ObExpr &expr, int ObExprToOutfileRow::calc_outfile_info(const ObExpr &expr,
ObEvalCtx &ctx, ObEvalCtx &ctx,
ObIAllocator &allocator, ObIAllocator &allocator,
ObExprOutFileInfo &out_info) ObExprOutFileInfo &out_info)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObObj objs_array[PARAM_SELECT_ITEM]; ObObj objs_array[PARAM_SELECT_ITEM];
@ -139,9 +139,9 @@ int ObExprToOutfileRow::calc_outfile_info(const ObExpr &expr,
out_info.line_ = objs_array[PARAM_LINE]; out_info.line_ = objs_array[PARAM_LINE];
out_info.enclose_ = objs_array[PARAM_ENCLOSED]; out_info.enclose_ = objs_array[PARAM_ENCLOSED];
out_info.escape_ = objs_array[PARAM_ESCAPED]; out_info.escape_ = objs_array[PARAM_ESCAPED];
out_info.print_params_.cs_type_ = static_cast<ObCollationType>(objs_array[PARAM_CHARSET].get_int()); out_info.print_params_.cs_type_ = static_cast<ObCollationType>(objs_array[PARAM_CHARSET].get_int());
} }
OZ(extract_fisrt_wchar_from_varhcar(out_info.field_, out_info.wchar_field_)); OZ(extract_fisrt_wchar_from_varhcar(out_info.field_, out_info.wchar_field_));
OZ(extract_fisrt_wchar_from_varhcar(out_info.line_, out_info.wchar_line_)); OZ(extract_fisrt_wchar_from_varhcar(out_info.line_, out_info.wchar_line_));
OZ(extract_fisrt_wchar_from_varhcar(out_info.enclose_, out_info.wchar_enclose_)); OZ(extract_fisrt_wchar_from_varhcar(out_info.enclose_, out_info.wchar_enclose_));

View File

@ -1280,7 +1280,7 @@ int ObLogPlan::pre_process_quals(SemiInfo* semi_info)
} else if (expr->has_flag(CNT_ROWNUM) || expr->has_flag(CNT_RAND_FUNC)) { } else if (expr->has_flag(CNT_ROWNUM) || expr->has_flag(CNT_RAND_FUNC)) {
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected expr in semi condition", K(ret), K(*expr)); LOG_WARN("unexpected expr in semi condition", K(ret), K(*expr));
} else if (!expr->has_flag(CNT_ONETIME)) { } else if (!expr->has_flag(CNT_ONETIME) || expr->has_flag(CNT_SUB_QUERY)) {
// do nothing // do nothing
} else if (OB_FAIL(add_subquery_filter(expr))) { } else if (OB_FAIL(add_subquery_filter(expr))) {
LOG_WARN("failed to add subquery filter", K(ret)); LOG_WARN("failed to add subquery filter", K(ret));
@ -1314,7 +1314,7 @@ int ObLogPlan::pre_process_quals(TableItem *table_item)
if (OB_ISNULL(expr = joined_table->join_conditions_.at(i))) { if (OB_ISNULL(expr = joined_table->join_conditions_.at(i))) {
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected NULL", K(ret), K(expr)); LOG_WARN("unexpected NULL", K(ret), K(expr));
} else if (!expr->has_flag(CNT_ONETIME)) { } else if (!expr->has_flag(CNT_ONETIME) || expr->has_flag(CNT_SUB_QUERY)) {
// do nothing // do nothing
} else if (OB_FAIL(add_subquery_filter(expr))) { } else if (OB_FAIL(add_subquery_filter(expr))) {
LOG_WARN("failed to add subquery filter", K(ret)); LOG_WARN("failed to add subquery filter", K(ret));