fix windown func px bug

This commit is contained in:
yinyj17
2023-04-23 08:37:49 +00:00
committed by ob-robot
parent 874d22a708
commit f1728bb159
3 changed files with 17 additions and 11 deletions

View File

@ -5676,7 +5676,12 @@ int ObSelectLogPlan::match_window_function_parallel(const ObIArray<ObWinFunRawEx
case T_FUN_SUM:
case T_FUN_MAX:
case T_FUN_MIN: {
/*do nothing*/
if (OB_ISNULL(win_expr->get_agg_expr())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected null agg expr", K(ret));
} else if (win_expr->get_agg_expr()->is_param_distinct()) {
can_parallel = false;
}
break;
}
default: {

View File

@ -1113,7 +1113,8 @@ int ObWhereSubQueryPullup::transform_single_set_query(ObDMLStmt *stmt,
LOG_WARN("get unexpected null", K(ret));
} else if (is_select_expr && !subquery->get_stmt_hint().has_enable_hint(T_UNNEST)) {
//do nothing
} else if (has_exist_in_array(transformed_subqueries, query_expr)) {
} else if (has_exist_in_array(transformed_subqueries, query_expr) ||
(subquery->get_select_item_size() > 1 && !is_vector_assign)) {
//do nothing
} else if (OB_FAIL(transformed_subqueries.push_back(query_expr))) {
LOG_WARN("fail to push back", K(ret));