fix log set fd bug
This commit is contained in:
@ -218,10 +218,10 @@ int ObLogSet::compute_fd_item_set()
|
|||||||
} else if (OB_FAIL(fd_item_set->push_back(fd_item))) {
|
} else if (OB_FAIL(fd_item_set->push_back(fd_item))) {
|
||||||
LOG_WARN("failed to push back fd item", K(ret));
|
LOG_WARN("failed to push back fd item", K(ret));
|
||||||
} else if ((ObSelectStmt::INTERSECT == set_op_ || ObSelectStmt::EXCEPT == set_op_) &&
|
} else if ((ObSelectStmt::INTERSECT == set_op_ || ObSelectStmt::EXCEPT == set_op_) &&
|
||||||
OB_FAIL(append(*fd_item_set, left_child->get_fd_item_set()))) {
|
OB_FAIL(append_child_fd_item_set(*fd_item_set, left_child->get_fd_item_set()))) {
|
||||||
LOG_WARN("failed to append fd item set", K(ret));
|
LOG_WARN("failed to append fd item set", K(ret));
|
||||||
} else if (ObSelectStmt::INTERSECT == set_op_ &&
|
} else if (ObSelectStmt::INTERSECT == set_op_ &&
|
||||||
OB_FAIL(append(*fd_item_set, right_child->get_fd_item_set()))) {
|
OB_FAIL(append_child_fd_item_set(*fd_item_set, right_child->get_fd_item_set()))) {
|
||||||
LOG_WARN("failed to append fd item set", K(ret));
|
LOG_WARN("failed to append fd item set", K(ret));
|
||||||
} else if (OB_FAIL(deduce_const_exprs_and_ft_item_set(*fd_item_set))) {
|
} else if (OB_FAIL(deduce_const_exprs_and_ft_item_set(*fd_item_set))) {
|
||||||
LOG_WARN("falied to deduce fd item set", K(ret));
|
LOG_WARN("falied to deduce fd item set", K(ret));
|
||||||
@ -231,6 +231,25 @@ int ObLogSet::compute_fd_item_set()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// just ignore table fd item now
|
||||||
|
// todo: adjust log set fd, convert child fd set to currnet level stmt
|
||||||
|
int ObLogSet::append_child_fd_item_set(ObFdItemSet &all_fd_item_set, const ObFdItemSet &child_fd_item_set)
|
||||||
|
{
|
||||||
|
int ret = OB_SUCCESS;
|
||||||
|
ObFdItem *fd_item = NULL;
|
||||||
|
for (int64_t i = 0; OB_SUCC(ret) && i < child_fd_item_set.count(); ++i) {
|
||||||
|
if (OB_ISNULL(fd_item = child_fd_item_set.at(i))) {
|
||||||
|
ret = OB_ERR_UNEXPECTED;
|
||||||
|
LOG_WARN("get unexpected null", K(ret));
|
||||||
|
} else if (fd_item->is_table_fd_item()) {
|
||||||
|
/* do nothing */
|
||||||
|
} else if (OB_FAIL(all_fd_item_set.push_back(fd_item))) {
|
||||||
|
LOG_WARN("failed to push back fd item", K(ret));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
int ObLogSet::compute_op_ordering()
|
int ObLogSet::compute_op_ordering()
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
|
|||||||
@ -121,6 +121,7 @@ public:
|
|||||||
int set_child_ndv(ObIArray<double> &ndv) { return child_ndv_.assign(ndv); }
|
int set_child_ndv(ObIArray<double> &ndv) { return child_ndv_.assign(ndv); }
|
||||||
int add_child_ndv(double ndv) { return child_ndv_.push_back(ndv); }
|
int add_child_ndv(double ndv) { return child_ndv_.push_back(ndv); }
|
||||||
virtual int get_card_without_filter(double &card) override;
|
virtual int get_card_without_filter(double &card) override;
|
||||||
|
int append_child_fd_item_set(ObFdItemSet &all_fd_item_set, const ObFdItemSet &child_fd_item_set);
|
||||||
private:
|
private:
|
||||||
bool is_distinct_;
|
bool is_distinct_;
|
||||||
bool is_recursive_union_;
|
bool is_recursive_union_;
|
||||||
|
|||||||
Reference in New Issue
Block a user