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
MCOL-1182 Keep filters for cross engine step
Cross engine step needs the filters for joining a constant with the cross engine table. Deleting them early causes a crash.
This commit is contained in:
@@ -1954,6 +1954,7 @@ const JobStepVector doOuterJoinOnFilter(OuterJoinOnFilter* oj, JobInfo& jobInfo)
|
|||||||
set<ParseTree*> doneNodes; // solved joins and simple filters
|
set<ParseTree*> doneNodes; // solved joins and simple filters
|
||||||
map<ParseTree*, ParseTree*> cpMap; // <child, parent> link for node removal
|
map<ParseTree*, ParseTree*> cpMap; // <child, parent> link for node removal
|
||||||
JobStepVector join; // join step with its projection steps
|
JobStepVector join; // join step with its projection steps
|
||||||
|
bool keepFilters = false; // keep filters for cross engine step
|
||||||
|
|
||||||
// To compromise the front end difficulty on setting outer attributes.
|
// To compromise the front end difficulty on setting outer attributes.
|
||||||
set<uint64_t> tablesInOuter;
|
set<uint64_t> tablesInOuter;
|
||||||
@@ -2162,6 +2163,14 @@ const JobStepVector doOuterJoinOnFilter(OuterJoinOnFilter* oj, JobInfo& jobInfo)
|
|||||||
|
|
||||||
jsv.insert(jsv.end(), sfv.begin(), sfv.end());
|
jsv.insert(jsv.end(), sfv.begin(), sfv.end());
|
||||||
|
|
||||||
|
// MCOL-1182 if we are doing a join between a cross engine
|
||||||
|
// step and a constant then keep the filter for the cross
|
||||||
|
// engine step instead of deleting it further down.
|
||||||
|
if (!sc->isInfiniDB())
|
||||||
|
{
|
||||||
|
keepFilters = true;
|
||||||
|
}
|
||||||
|
|
||||||
doneNodes.insert(cn);
|
doneNodes.insert(cn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2198,7 +2207,10 @@ const JobStepVector doOuterJoinOnFilter(OuterJoinOnFilter* oj, JobInfo& jobInfo)
|
|||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
{
|
||||||
filters = NULL;
|
filters = NULL;
|
||||||
delete c;
|
if (!keepFilters)
|
||||||
|
{
|
||||||
|
delete c;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2240,8 +2252,11 @@ const JobStepVector doOuterJoinOnFilter(OuterJoinOnFilter* oj, JobInfo& jobInfo)
|
|||||||
|
|
||||||
p->left(nullTree);
|
p->left(nullTree);
|
||||||
p->right(nullTree);
|
p->right(nullTree);
|
||||||
delete p;
|
if (!keepFilters)
|
||||||
delete c;
|
{
|
||||||
|
delete p;
|
||||||
|
delete c;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user