1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-3503 add MODA aggregate function

This commit is contained in:
David Hall
2019-09-27 12:22:44 -05:00
parent 1f475340dc
commit cbef44a0be
9 changed files with 1042 additions and 6 deletions

2
dbcon/joblist/windowfunctionstep.cpp Normal file → Executable file
View File

@@ -522,7 +522,7 @@ void WindowFunctionStep::checkWindowFunction(CalpontSelectExecutionPlan* csep, J
igpc < csep->groupByCols().end();
++igpc)
{
if (*igpc->get() == *j->get())
if ((*igpc)->alias() == (*j)->alias())
{
bFound = true;
break;

4
dbcon/mysql/ha_calpont_execplan.cpp Normal file → Executable file
View File

@@ -4950,6 +4950,10 @@ ReturnedColumn* buildAggregateColumn(Item* item, gp_walk_info& gwi)
mcsv1sdk::mcsv1Context& context = udafc->getContext();
context.setName(isp->func_name());
// Get the return type as defined by CREATE AGGREGATE FUNCTION
// Most functions don't care, but some may.
context.setMariaDBReturnType((mcsv1sdk::enum_mariadb_return_type)isp->field_type());
// Set up the return type defaults for the call to init()
context.setResultType(udafc->resultType().colDataType);
context.setColWidth(udafc->resultType().colWidth);