You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4680 FROM subquery containing nested joins returns an error.
Main theme of the patch is to fix joins processing in the plugin code. We now use SELECT_LEX::top_join_list and process the nested joins recursively, instead of SELECT_LEX::table_list struct which we earlier used to build the join filters. The earlier approach did not process certain nested join ON expressions, causing certain queries to incorrectly error out such as that described in MCOL-4680. In addition, some legacy code is also removed.
This commit is contained in:
@ -44,7 +44,8 @@ using namespace execplan;
|
||||
|
||||
namespace cal_impl_if
|
||||
{
|
||||
extern uint32_t buildOuterJoin(gp_walk_info& gwi, SELECT_LEX& select_lex);
|
||||
extern uint32_t buildJoin(gp_walk_info& gwi, List<TABLE_LIST>& join_list,
|
||||
std::stack<execplan::ParseTree*>& outerJoinStack);
|
||||
extern string getViewName(TABLE_LIST* table_ptr);
|
||||
|
||||
CalpontSystemCatalog::TableAliasName& View::viewName()
|
||||
@ -182,9 +183,9 @@ void View::transform()
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t View::processOuterJoin(gp_walk_info& gwi)
|
||||
uint32_t View::processJoin(gp_walk_info& gwi, std::stack<execplan::ParseTree*>& outerJoinStack)
|
||||
{
|
||||
return buildOuterJoin(gwi, fSelect);
|
||||
return buildJoin(gwi, fSelect.top_join_list, outerJoinStack);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user