[CP] fix rollup const expr bug
This commit is contained in:
@ -1152,6 +1152,25 @@ int ObLogGroupBy::generate_link_sql_pre(GenLinkStmtContext& link_ctx)
|
|||||||
return ret;
|
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 ObLogGroupBy::compute_fd_item_set()
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
|
|||||||
@ -108,6 +108,7 @@ public:
|
|||||||
}
|
}
|
||||||
virtual int generate_link_sql_pre(GenLinkStmtContext& link_ctx) override;
|
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_fd_item_set() override;
|
||||||
virtual int compute_op_ordering() override;
|
virtual int compute_op_ordering() override;
|
||||||
double get_distinct_card() const
|
double get_distinct_card() const
|
||||||
|
|||||||
Reference in New Issue
Block a user