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-1793 Handle transition of Window Frame from outside of Partition to inside
This commit is contained in:
@ -194,23 +194,26 @@ void WindowFunction::operator()()
|
|||||||
// Built-in functions may have this functionality added in the future.
|
// Built-in functions may have this functionality added in the future.
|
||||||
// If b > e then the frame is entirely outside of the partition
|
// If b > e then the frame is entirely outside of the partition
|
||||||
// and there's no values to drop
|
// and there's no values to drop
|
||||||
if (!firstTime && b <= e)
|
if (b <= e)
|
||||||
{
|
{
|
||||||
if (fFunctionType->dropValues(prevFrame.first, w.first))
|
if (!firstTime)
|
||||||
{
|
{
|
||||||
// Adjust the beginning of the frame for nextValue
|
if (fFunctionType->dropValues(prevFrame.first, w.first))
|
||||||
// to start where the previous frame left off.
|
{
|
||||||
b = prevFrame.second + 1;
|
// Adjust the beginning of the frame for nextValue
|
||||||
}
|
// to start where the previous frame left off.
|
||||||
else
|
b = prevFrame.second + 1;
|
||||||
{
|
}
|
||||||
// dropValues failed or doesn't exist
|
else
|
||||||
// so calculate the entire frame.
|
{
|
||||||
fFunctionType->resetData();
|
// dropValues failed or doesn't exist
|
||||||
|
// so calculate the entire frame.
|
||||||
|
fFunctionType->resetData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
firstTime = false;
|
||||||
}
|
}
|
||||||
fFunctionType->operator()(b, e, i); // UDAnF: Calls nextValue and evaluate
|
fFunctionType->operator()(b, e, i); // UDAnF: Calls nextValue and evaluate
|
||||||
firstTime = false;
|
|
||||||
prevFrame = w;
|
prevFrame = w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user