1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge pull request #885 from tntnatbry/fix-windowfunc-orderby

Allow a window function in the ORDER BY clause.
This commit is contained in:
Roman Nozdrin
2019-10-07 09:53:06 +03:00
committed by GitHub

View File

@ -361,9 +361,10 @@ bool sortItemIsInGrouping(Item* sort_item, ORDER* groupcol)
Item_func *ifp = reinterpret_cast<Item_func*>(sort_item);
ifp->traverse_cond(check_sum_func_item, &found, Item::POSTFIX);
}
else if (sort_item->type() == Item::CONST_ITEM)
else if (sort_item->type() == Item::CONST_ITEM ||
sort_item->type() == Item::WINDOW_FUNC_ITEM)
{
found= true;
found = true;
}
for (; !found && groupcol; groupcol = groupcol->next)