Fix bug that push down the predicates past AggregateNode (#658)

This commit is contained in:
chenhao
2019-02-26 10:55:14 +08:00
committed by ZHAO Chun
parent 4907577e99
commit 397747af2c
2 changed files with 12 additions and 10 deletions

View File

@ -143,10 +143,12 @@ ExecNode::~ExecNode() {
void ExecNode::push_down_predicate(
RuntimeState* state, std::list<ExprContext*>* expr_ctxs) {
for (int i = 0; i < _children.size(); ++i) {
_children[i]->push_down_predicate(state, expr_ctxs);
if (expr_ctxs->size() == 0) {
return;
if (_type != TPlanNodeType::AGGREGATION_NODE) {
for (int i = 0; i < _children.size(); ++i) {
_children[i]->push_down_predicate(state, expr_ctxs);
if (expr_ctxs->size() == 0) {
return;
}
}
}