You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
Merge branch 'MCOL-1201-b' of https://github.com/mariadb-corporation/mariadb-columnstore-engine into MCOL-1201-b
This commit is contained in:
@@ -707,7 +707,6 @@ void debug_walk(const Item* item, void* arg)
|
||||
else if (ref->real_item()->type() == Item::FIELD_ITEM)
|
||||
{
|
||||
Item_field* ifp = (Item_field*)ref->real_item();
|
||||
|
||||
// MCOL-1052 The field referenced presumable came from
|
||||
// extended SELECT list.
|
||||
if ( !ifp->field_name )
|
||||
@@ -719,7 +718,6 @@ void debug_walk(const Item* item, void* arg)
|
||||
cerr << "REF FIELD_ITEM: " << ifp->db_name << '.' << bestTableName(ifp) << '.' <<
|
||||
ifp->field_name << endl;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
else if (ref->real_item()->type() == Item::FUNC_ITEM)
|
||||
@@ -927,7 +925,6 @@ void debug_walk(const Item* item, void* arg)
|
||||
cerr << "NULL item" << endl;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
cerr << "UNKNOWN_ITEM type " << item->type() << endl;
|
||||
@@ -1009,8 +1006,8 @@ uint32_t buildOuterJoin(gp_walk_info& gwi, SELECT_LEX& select_lex)
|
||||
// View is already processed in view::transform
|
||||
// @bug5319. view is sometimes treated as derived table and
|
||||
// fromSub::transform does not build outer join filters.
|
||||
if (!table_ptr->derived && table_ptr->view)
|
||||
continue;
|
||||
//if (!table_ptr->derived && table_ptr->view)
|
||||
// continue;
|
||||
|
||||
CalpontSystemCatalog:: TableAliasName tan = make_aliasview(
|
||||
(table_ptr->db ? table_ptr->db : ""),
|
||||
@@ -5131,7 +5128,6 @@ void gp_walk(const Item* item, void* arg)
|
||||
if (col->type() != Item::COND_ITEM)
|
||||
{
|
||||
rc = buildReturnedColumn(col, *gwip, gwip->fatalParseError);
|
||||
|
||||
if ( col->type() == Item::FIELD_ITEM )
|
||||
gwip->fatalParseError = false;
|
||||
}
|
||||
@@ -5211,24 +5207,19 @@ void gp_walk(const Item* item, void* arg)
|
||||
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
|
||||
@@ -8111,22 +8102,16 @@ ConstantColumn* buildConstColFromFilter(SimpleColumn* originalSC,
|
||||
execplan::SimpleFilter* simpFilter;
|
||||
execplan::ConstantColumn* result = NULL;
|
||||
std::vector<ParseTree*>::iterator ptIt = gi.pushedPts.begin();
|
||||
|
||||
for(; ptIt != gi.pushedPts.end(); ptIt++)
|
||||
{
|
||||
simpFilter = dynamic_cast<execplan::SimpleFilter*>((*ptIt)->data());
|
||||
|
||||
if (simpFilter == NULL)
|
||||
continue;
|
||||
|
||||
simpleCol = dynamic_cast<execplan::SimpleColumn*>(simpFilter->lhs());
|
||||
constCol = dynamic_cast<execplan::ConstantColumn*>(simpFilter->rhs());
|
||||
|
||||
if(simpleCol == NULL || constCol == NULL)
|
||||
continue;
|
||||
|
||||
op = simpFilter->op();
|
||||
|
||||
if ( originalSC->sameColumn(dynamic_cast<execplan::ReturnedColumn*>(simpleCol))
|
||||
&& op.get()->op() == OP_EQ && constCol)
|
||||
{
|
||||
@@ -8139,7 +8124,6 @@ ConstantColumn* buildConstColFromFilter(SimpleColumn* originalSC,
|
||||
result = constCol;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -8544,7 +8528,6 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
gwi.returnedCols.push_back(spsc);
|
||||
gwi.columnMap.insert(CalpontSelectExecutionPlan::ColumnMap::value_type(string(ifp->field_name), spsc));
|
||||
}
|
||||
|
||||
TABLE_LIST* tmp = 0;
|
||||
|
||||
if (ifp->cached_table)
|
||||
@@ -8581,7 +8564,6 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
gwi.returnedCols.push_back(spac);
|
||||
// This item will be used in HAVING later.
|
||||
Item_func_or_sum* isfp = reinterpret_cast<Item_func_or_sum*>(item);
|
||||
|
||||
if ( ! isfp->name_length )
|
||||
{
|
||||
gwi.havingAggColsItems.push_back(item);
|
||||
@@ -9499,7 +9481,6 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
if ( rc && ord_item->type() == Item::FIELD_ITEM )
|
||||
{
|
||||
execplan::CalpontSelectExecutionPlan::ReturnedColumnList::iterator iter = gwi.groupByCols.begin();
|
||||
|
||||
for( ; iter != gwi.groupByCols.end(); iter++ )
|
||||
{
|
||||
if( rc->sameColumn((*iter).get()) )
|
||||
@@ -9513,7 +9494,6 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// MCOL-1052 GROUP BY items list doesn't contain
|
||||
// this ORDER BY item.
|
||||
if ( iter == gwi.groupByCols.end() )
|
||||
@@ -9521,22 +9501,18 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
Item_ident *iip = reinterpret_cast<Item_ident*>(ord_item);
|
||||
std::ostringstream ostream;
|
||||
ostream << "'";
|
||||
|
||||
if (iip->db_name)
|
||||
ostream << iip->db_name << '.';
|
||||
else
|
||||
ostream << "unknown db" << '.';
|
||||
|
||||
if (iip->table_name)
|
||||
ostream << iip->table_name << '.';
|
||||
else
|
||||
ostream << "unknown table" << '.';
|
||||
|
||||
if (iip->field_name)
|
||||
ostream << iip->field_name;
|
||||
else
|
||||
ostream << "unknown field";
|
||||
|
||||
ostream << "'";
|
||||
Message::Args args;
|
||||
args.add(ostream.str());
|
||||
@@ -9567,7 +9543,6 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
if (!rc)
|
||||
{
|
||||
Item* item_ptr = ordercol->item_ptr;
|
||||
|
||||
if (item_ptr)
|
||||
rc = buildReturnedColumn(item_ptr, gwi, gwi.fatalParseError);
|
||||
}
|
||||
|
@@ -469,7 +469,6 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
|
||||
{
|
||||
Field** f;
|
||||
f = ti.msTablePtr->field;
|
||||
|
||||
//set all fields to null in null col bitmap
|
||||
if (!handler_flag)
|
||||
memset(buf, -1, ti.msTablePtr->s->null_bytes);
|
||||
@@ -477,7 +476,6 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
|
||||
{
|
||||
memset(ti.msTablePtr->null_flags, -1, ti.msTablePtr->s->null_bytes);
|
||||
}
|
||||
|
||||
std::vector<CalpontSystemCatalog::ColType>& colTypes = ti.tpl_scan_ctx->ctp;
|
||||
int64_t intColVal = 0;
|
||||
uint64_t uintColVal = 0;
|
||||
@@ -5281,7 +5279,6 @@ int ha_calpont_impl_group_by_init(ha_calpont_group_by_handler* group_hand, TABLE
|
||||
for(TABLE_LIST* tl = gi.groupByTables; tl; tl=tl->next_local)
|
||||
{
|
||||
mapiter = ci->tableMap.find(tl->table);
|
||||
|
||||
if(mapiter != ci->tableMap.end() && mapiter->second.condInfo != NULL
|
||||
&& mapiter->second.condInfo->condPush)
|
||||
{
|
||||
|
Reference in New Issue
Block a user