提交 f844e90c 编写于 作者: O obdev 提交者: 羽飞

[CP] fix rollup const expr bug

上级 c95b6b53
......@@ -1152,6 +1152,25 @@ int ObLogGroupBy::generate_link_sql_pre(GenLinkStmtContext& link_ctx)
return ret;
}
int ObLogGroupBy::compute_const_exprs()
{
int ret = OB_SUCCESS;
ObLogicalOperator *child = NULL;
if (OB_ISNULL(my_plan_) || OB_UNLIKELY(get_num_of_child() < 0)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("operator is invalid", K(ret), K(get_num_of_child()), K(my_plan_));
} else if (OB_ISNULL(child = get_child(0))) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("child is null", K(ret), K(child));
} else if (!has_rollup() && OB_FAIL(append(get_output_const_exprs(), child->get_output_const_exprs()))) {
LOG_WARN("failed to append exprs", K(ret));
} else if (OB_FAIL(ObOptimizerUtil::compute_const_exprs(get_filter_exprs(), get_output_const_exprs()))) {
LOG_WARN("failed to compute const conditionexprs", K(ret));
} else { /*do nothing*/
}
return ret;
}
int ObLogGroupBy::compute_fd_item_set()
{
int ret = OB_SUCCESS;
......
......@@ -108,6 +108,7 @@ public:
}
virtual int generate_link_sql_pre(GenLinkStmtContext& link_ctx) override;
virtual int compute_const_exprs() override;
virtual int compute_fd_item_set() override;
virtual int compute_op_ordering() override;
double get_distinct_card() const
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册