1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Fix another merge error

This commit is contained in:
Andrew Hutchings
2018-05-09 09:47:07 +01:00
parent 1ac28c4f26
commit bb06ac4de4

View File

@ -5044,8 +5044,14 @@ void gp_walk(const Item* item, void* arg)
gwip->clauseType = SELECT;
if (col->type() != Item::COND_ITEM)
{
rc = buildReturnedColumn(col, *gwip, gwip->fatalParseError);
if ( col->type() == Item::FIELD_ITEM )
gwip->fatalParseError = false;
}
SimpleColumn* sc = dynamic_cast<SimpleColumn*>(rc);
if (sc)
@ -5116,6 +5122,31 @@ void gp_walk(const Item* item, void* arg)
Item_func* ifp = (Item_func*)col;
gwip->ptWorkStack.push(buildParseTree(ifp, *gwip, gwip->fatalParseError));
}
else if (col->type() == Item::FIELD_ITEM && gwip->clauseType == HAVING)
{
Item_field* ifip = static_cast<Item_field*>(col);
std::vector<Item*>::iterator iter = gwip->havingAggColsItems.begin();
Item_func_or_sum* isfp = NULL;
for ( ; iter != gwip->havingAggColsItems.end(); iter++ )
{
Item* temp_isfp = *iter;
isfp = reinterpret_cast<Item_func_or_sum*>(temp_isfp);
if ( isfp->type() == Item::SUM_FUNC_ITEM &&
isfp->result_field == ifip->field )
{
ReturnedColumn* rc = buildAggregateColumn(isfp, *gwip);
if (rc)
gwip->rcWorkStack.push(rc);
break;
}
}
break;
}
else
cando = false;