add expression in information_schema.statistics、add error code for group_id aggr and no implicit cast for variance aggr

This commit is contained in:
wangt1xiuyi
2023-08-02 07:24:23 +00:00
committed by ob-robot
parent 3d3c85657a
commit 9aa4d8a313
11 changed files with 70 additions and 15 deletions

View File

@ -3258,7 +3258,14 @@ int ObRawExprDeduceType::add_implicit_cast(ObAggFunRawExpr &parent,
((parent.get_expr_type() == T_FUN_SUM ||
parent.get_expr_type() == T_FUN_AVG ||
parent.get_expr_type() == T_FUN_COUNT) &&
child_ptr->get_expr_type() == T_FUN_SYS_OP_OPNSIZE)) {
child_ptr->get_expr_type() == T_FUN_SYS_OP_OPNSIZE) ||
(lib::is_mysql_mode() &&
(T_FUN_VARIANCE == parent.get_expr_type() ||
T_FUN_STDDEV == parent.get_expr_type() ||
T_FUN_STDDEV_POP == parent.get_expr_type() ||
T_FUN_STDDEV_SAMP == parent.get_expr_type() ||
T_FUN_VAR_POP == parent.get_expr_type() ||
T_FUN_VAR_SAMP == parent.get_expr_type()))) {
//do nothing
} else if (parent.get_expr_type() == T_FUN_WM_CONCAT ||
parent.get_expr_type() == T_FUN_KEEP_WM_CONCAT ||