Fix failed mysqltests caused by fixing rollup shared exprs bug and fixing core at inner_same_as

This commit is contained in:
obdev
2022-12-12 15:41:28 +00:00
committed by ob-robot
parent 06d62f76a9
commit 1be6c41e7e
3 changed files with 27 additions and 6 deletions

View File

@ -9256,7 +9256,8 @@ int ObTransformUtils::replace_with_groupby_exprs(ObSelectStmt *select_stmt,
if (OB_ISNULL(groupby_exprs.at(i))) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("got an unexpected null", K(ret));
} else if (groupby_exprs.at(i)->same_as(*expr, &check_context)) {
} else if ((is_mysql_mode() || !expr->is_static_const_expr())
&& groupby_exprs.at(i)->same_as(*expr, &check_context)) {
expr = groupby_exprs.at(i);
is_existed = true;
} else { /*do nothing.*/ }