提交 031989c2 编写于 作者: O obdev 提交者: wangzelin.wzl

fix issue/42559381,query result incorrect bug

上级 b056d5d7
...@@ -1436,13 +1436,8 @@ int ObExprGeneratorImpl::visit(ObAggFunRawExpr& expr) ...@@ -1436,13 +1436,8 @@ int ObExprGeneratorImpl::visit(ObAggFunRawExpr& expr)
} else if (OB_FAIL(sql_expr_->add_expr_item(item, &expr))) { } else if (OB_FAIL(sql_expr_->add_expr_item(item, &expr))) {
LOG_WARN("failed to add expr item", K(ret)); LOG_WARN("failed to add expr item", K(ret));
} else { } else {
if (T_FUN_JSON_OBJECTAGG == expr.get_expr_type()) {
aggr_expr->set_real_param_col_count(expr.get_real_param_count()); aggr_expr->set_real_param_col_count(expr.get_real_param_count());
aggr_expr->set_all_param_col_count(expr.get_param_count()); aggr_expr->set_all_param_col_count(expr.get_param_count());
} else {
aggr_expr->set_real_param_col_count(1);
aggr_expr->set_all_param_col_count(1);
}
if (OB_SUCCESS == ret && if (OB_SUCCESS == ret &&
(T_FUN_GROUP_CONCAT == expr.get_expr_type() || T_FUN_GROUP_RANK == expr.get_expr_type() || (T_FUN_GROUP_CONCAT == expr.get_expr_type() || T_FUN_GROUP_RANK == expr.get_expr_type() ||
T_FUN_GROUP_DENSE_RANK == expr.get_expr_type() || T_FUN_GROUP_PERCENT_RANK == expr.get_expr_type() || T_FUN_GROUP_DENSE_RANK == expr.get_expr_type() || T_FUN_GROUP_PERCENT_RANK == expr.get_expr_type() ||
......
...@@ -60,7 +60,7 @@ private: ...@@ -60,7 +60,7 @@ private:
DistinctObjMeta(ObObjType obj_type, ObCollationType coll_type, ObCollationLevel coll_level) DistinctObjMeta(ObObjType obj_type, ObCollationType coll_type, ObCollationLevel coll_level)
: obj_type_(obj_type), coll_type_(coll_type), coll_level_(coll_level) : obj_type_(obj_type), coll_type_(coll_type), coll_level_(coll_level)
{ {
if (!ObDatumFuncs::is_string_type(obj_type_) || !ObDatumFuncs::is_json(obj_type_)) { if (!ObDatumFuncs::is_string_type(obj_type_) && !ObDatumFuncs::is_json(obj_type_)) {
coll_type_ = CS_TYPE_MAX; coll_type_ = CS_TYPE_MAX;
coll_level_ = CS_LEVEL_INVALID; coll_level_ = CS_LEVEL_INVALID;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册