1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

Revert "MCOL-3827 Optimize out sort on SubQuery in Select"

This commit is contained in:
Gagan Goel
2020-08-19 19:23:55 -04:00
committed by GitHub
parent fd0ef267b5
commit 03c50eabee
2 changed files with 11 additions and 19 deletions

View File

@ -823,7 +823,7 @@ void addOrderByAndLimit(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo)
if (sc == NULL) if (sc == NULL)
{ {
const ReturnedColumn* rc = dynamic_cast<const ReturnedColumn*>(orderByCols[i].get()); const ReturnedColumn* rc = dynamic_cast<const ReturnedColumn*>(orderByCols[i].get());
uint32_t eid = rc->expressionId(); uint64_t eid = rc->expressionId();
CalpontSystemCatalog::ColType ct = rc->resultType(); CalpontSystemCatalog::ColType ct = rc->resultType();
tupleKey = getExpTupleKey(jobInfo, eid); tupleKey = getExpTupleKey(jobInfo, eid);
jobInfo.orderByColVec.push_back(make_pair(tupleKey, orderByCols[i]->asc())); jobInfo.orderByColVec.push_back(make_pair(tupleKey, orderByCols[i]->asc()));

View File

@ -7791,9 +7791,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
} }
} }
SimpleColumn* sc = dynamic_cast<SimpleColumn*>(rc);
if (!sc || sc->oid())
{
if (ordercol->direction == ORDER::ORDER_ASC) if (ordercol->direction == ORDER::ORDER_ASC)
rc->asc(true); rc->asc(true);
else else
@ -7802,7 +7799,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
gwi.orderByCols.push_back(SRCP(rc)); gwi.orderByCols.push_back(SRCP(rc));
} }
} }
}
// make sure columnmap, returnedcols and count(*) arg_list are not empty // make sure columnmap, returnedcols and count(*) arg_list are not empty
TableMap::iterator tb_iter = gwi.tableMap.begin(); TableMap::iterator tb_iter = gwi.tableMap.begin();
@ -9587,9 +9583,6 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
} }
} }
SimpleColumn* sc = dynamic_cast<SimpleColumn*>(rc);
if (!sc || sc->oid())
{
if (ordercol->direction == ORDER::ORDER_ASC) if (ordercol->direction == ORDER::ORDER_ASC)
rc->asc(true); rc->asc(true);
else else
@ -9597,7 +9590,6 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
gwi.orderByCols.push_back(SRCP(rc)); gwi.orderByCols.push_back(SRCP(rc));
} }
}
// make sure columnmap, returnedcols and count(*) arg_list are not empty // make sure columnmap, returnedcols and count(*) arg_list are not empty