You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-4617 Move in-to-exists predicate creation and injection into the engine.
We earlier leveraged the server functionality provided by Item_in_subselect::create_in_to_exists_cond and Item_in_subselect::inject_in_to_exists_cond to create and inject the in-to-exists predicate into an IN subquery's JOIN struct. With this patch, we leave the IN subquery's JOIN unaltered and instead directly perform this predicate creation and injection into ColumnStore's select execution plan.
This commit is contained in:
@ -158,6 +158,12 @@ struct gp_walk_info
|
||||
|
||||
bool isGroupByHandler;
|
||||
|
||||
// MCOL-4617 The below 2 fields are used for in-to-exists
|
||||
// predicate creation and injection. See usage in InSub::transform()
|
||||
// and buildInToExistsFilter()
|
||||
execplan::ReturnedColumn* inSubQueryLHS;
|
||||
Item* inSubQueryLHSItem;
|
||||
|
||||
gp_walk_info() : sessionid(0),
|
||||
fatalParseError(false),
|
||||
condPush(false),
|
||||
@ -177,7 +183,9 @@ struct gp_walk_info
|
||||
inCaseStmt(false),
|
||||
cs_vtable_is_update_with_derive(false),
|
||||
cs_vtable_impossible_where_on_union(false),
|
||||
isGroupByHandler(false)
|
||||
isGroupByHandler(false),
|
||||
inSubQueryLHS(nullptr),
|
||||
inSubQueryLHSItem(nullptr)
|
||||
{}
|
||||
|
||||
~gp_walk_info() {}
|
||||
@ -385,6 +393,13 @@ execplan::ParseTree* setDerivedFilter(THD* thd, execplan::ParseTree*& n,
|
||||
std::map<std::string, execplan::ParseTree*>& obj,
|
||||
execplan::CalpontSelectExecutionPlan::SelectList& derivedTbList);
|
||||
void derivedTableOptimization(THD* thd, execplan::SCSEP& csep);
|
||||
bool buildEqualityPredicate(execplan::ReturnedColumn* lhs,
|
||||
execplan::ReturnedColumn* rhs,
|
||||
gp_walk_info* gwip,
|
||||
boost::shared_ptr<execplan::Operator>& sop,
|
||||
const Item_func::Functype& funcType,
|
||||
const std::vector<Item*>& itemList,
|
||||
bool isInSubs = false);
|
||||
|
||||
#ifdef DEBUG_WALK_COND
|
||||
void debug_walk(const Item* item, void* arg);
|
||||
|
Reference in New Issue
Block a user