You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4719 iterate into subquery looking for windowfunctions
When an outer query filter accesses an subquery column that contains an aggregate or a window function, certain optimizations can't be performed. We had been looking at the surface of the returned column. We now iterate into any functions or operations looking for aggregates and window functions.
This commit is contained in:
@ -71,11 +71,19 @@ void getWindowFunctionCols(execplan::ParseTree* n, void* obj)
|
||||
if (afc)
|
||||
list->push_back(afc);
|
||||
else if (ac)
|
||||
list->insert(list->end(), ac->windowfunctionColumnList().begin(), ac->windowfunctionColumnList().end());
|
||||
{
|
||||
if (ac->hasWindowFunc()) // adds window functions to list
|
||||
list->insert(list->end(), ac->windowfunctionColumnList().begin(), ac->windowfunctionColumnList().end());
|
||||
}
|
||||
else if (fc)
|
||||
list->insert(list->end(), fc->windowfunctionColumnList().begin(), fc->windowfunctionColumnList().end());
|
||||
{
|
||||
if (fc->hasWindowFunc())
|
||||
list->insert(list->end(), fc->windowfunctionColumnList().begin(), fc->windowfunctionColumnList().end());
|
||||
}
|
||||
else if (sf)
|
||||
{
|
||||
list->insert(list->end(), sf->windowfunctionColumnList().begin(), sf->windowfunctionColumnList().end());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user