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-597 Fix up Windows Functions
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
/** @file */
|
||||
//#define DEBUG_WALK_COND
|
||||
#define DEBUG_WALK_COND
|
||||
#include <my_config.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
@ -38,7 +38,6 @@
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <time.h>
|
||||
//#define NDEBUG
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@ -699,13 +698,11 @@ void debug_walk(const Item *item, void *arg)
|
||||
cout << ": <NULL>" << endl;
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
case Item::WINDOW_FUNC_ITEM:
|
||||
{
|
||||
cout << "Window Function Item" << endl;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
{
|
||||
cout << "UNKNOWN_ITEM type " << item->type() << endl;
|
||||
@ -2464,11 +2461,11 @@ ReturnedColumn* buildReturnedColumn(Item* item, gp_walk_info& gwi, bool& nonSupp
|
||||
rc = new ConstantColumn(valStr);
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
case Item::WINDOW_FUNC_ITEM:
|
||||
{
|
||||
return buildWindowFunctionColumn(item, gwi, nonSupport);
|
||||
}
|
||||
#if INTERVAL_ITEM
|
||||
case Item::INTERVAL_ITEM:
|
||||
{
|
||||
Item_interval* interval = (Item_interval*)item;
|
||||
@ -2481,7 +2478,7 @@ ReturnedColumn* buildReturnedColumn(Item* item, gp_walk_info& gwi, bool& nonSupp
|
||||
rc->resultType(srcp->resultType());
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
case Item::SUBSELECT_ITEM:
|
||||
{
|
||||
gwi.hasSubSelect = true;
|
||||
@ -4437,17 +4434,15 @@ void gp_walk(const Item *item, void *arg)
|
||||
gwip->rcWorkStack.push(buildReturnedColumn(itp, *gwip, gwip->fatalParseError));
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
case Item::WINDOW_FUNC_ITEM:
|
||||
{
|
||||
gwip->hasWindowFunc = true;
|
||||
Item_func_window* ifa = (Item_func_window*)item;
|
||||
Item_window_func* ifa = (Item_window_func*)item;
|
||||
ReturnedColumn* af = buildWindowFunctionColumn(ifa, *gwip, gwip->fatalParseError);
|
||||
if (af)
|
||||
gwip->rcWorkStack.push(af);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case Item::COPY_STR_ITEM:
|
||||
printf("********** received COPY_STR_ITEM *********\n");
|
||||
break;
|
||||
@ -4631,11 +4626,9 @@ void parse_item (Item *item, vector<Item_field*>& field_vec, bool& hasNonSupport
|
||||
setError(item->thd(), ER_CHECK_NOT_IMPLEMENTED, parseErrorText);
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
case Item::WINDOW_FUNC_ITEM:
|
||||
parseInfo |= AF_BIT;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -5525,7 +5518,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
|
||||
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
|
||||
return ER_CHECK_NOT_IMPLEMENTED;
|
||||
}
|
||||
#if 0
|
||||
case Item::WINDOW_FUNC_ITEM:
|
||||
{
|
||||
SRCP srcp(buildWindowFunctionColumn(item, gwi, gwi.fatalParseError));
|
||||
@ -5539,7 +5531,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
|
||||
gwi.returnedCols.push_back(srcp);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
{
|
||||
break;
|
||||
@ -5692,7 +5683,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
|
||||
|
||||
// check if window functions are in order by. InfiniDB process order by list if
|
||||
// window functions are involved, either in order by or projection.
|
||||
#if 0
|
||||
bool hasWindowFunc = gwi.hasWindowFunc;
|
||||
gwi.hasWindowFunc = false;
|
||||
for (; groupcol; groupcol= groupcol->next)
|
||||
@ -5708,7 +5698,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
|
||||
return ER_CHECK_NOT_IMPLEMENTED;
|
||||
}
|
||||
gwi.hasWindowFunc = hasWindowFunc;
|
||||
#endif
|
||||
groupcol = reinterpret_cast<ORDER*>(select_lex.group_list.first);
|
||||
|
||||
for (; groupcol; groupcol= groupcol->next)
|
||||
@ -5954,13 +5943,11 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
|
||||
|
||||
// check if window functions are in order by. InfiniDB process order by list if
|
||||
// window functions are involved, either in order by or projection.
|
||||
#if 0
|
||||
for (; ordercol; ordercol= ordercol->next)
|
||||
{
|
||||
if ((*(ordercol->item))->type() == Item::WINDOW_FUNC_ITEM)
|
||||
gwi.hasWindowFunc = true;
|
||||
}
|
||||
#endif
|
||||
// re-visit the first of ordercol list
|
||||
ordercol = reinterpret_cast<ORDER*>(order_list.first);
|
||||
|
||||
|
Reference in New Issue
Block a user