提交 5f57aa9e 编写于 作者: L lz0 提交者: LINGuanRen

Fix rollup wrong result bug

上级 b6dbe82e
...@@ -157,6 +157,9 @@ int ObMergeGroupByOp::rewrite_rollup_column(ObExpr*& diff_expr) ...@@ -157,6 +157,9 @@ int ObMergeGroupByOp::rewrite_rollup_column(ObExpr*& diff_expr)
diff_expr = NULL; diff_expr = NULL;
} }
} }
if (is_distinct_expr) {
diff_expr = nullptr;
}
} }
return ret; return ret;
} }
...@@ -418,7 +421,6 @@ int ObMergeGroupByOp::rollup_and_calc_results(const int64_t group_id, const ObEx ...@@ -418,7 +421,6 @@ int ObMergeGroupByOp::rollup_and_calc_results(const int64_t group_id, const ObEx
if (OB_FAIL(aggr_processor_.rollup_process(group_id, diff_expr))) { if (OB_FAIL(aggr_processor_.rollup_process(group_id, diff_expr))) {
LOG_WARN("failed to rollup aggregation results", K(ret)); LOG_WARN("failed to rollup aggregation results", K(ret));
} }
diff_expr = 0;
} }
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
clear_evaluated_flag(); clear_evaluated_flag();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册