You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-1201 fix some regressions
This commit is contained in:
@@ -1505,11 +1505,18 @@ void TupleAggregateStep::prep1PhaseAggregate(
|
||||
typeAgg.push_back(typeProj[colProj]);
|
||||
widthAgg.push_back(width[colProj]);
|
||||
// If the param is const
|
||||
if (udafc)
|
||||
{
|
||||
ConstantColumn* cc = dynamic_cast<ConstantColumn*>(udafc->aggParms()[udafcParamIdx].get());
|
||||
if (cc)
|
||||
{
|
||||
funct->fpConstCol = udafc->aggParms()[udafcParamIdx];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw QueryDataExcept("prep1PhaseAggregate: UDAF multi function with no parms", aggregateFuncErr);
|
||||
}
|
||||
++udafcParamIdx;
|
||||
}
|
||||
break;
|
||||
@@ -2123,11 +2130,18 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
|
||||
multiParmIndexes.push_back(colAgg);
|
||||
++colAgg;
|
||||
// If the param is const
|
||||
if (udafc)
|
||||
{
|
||||
ConstantColumn* cc = dynamic_cast<ConstantColumn*>(udafc->aggParms()[udafcParamIdx].get());
|
||||
if (cc)
|
||||
{
|
||||
funct->fpConstCol = udafc->aggParms()[udafcParamIdx];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw QueryDataExcept("prep1PhaseDistinctAggregate: UDAF multi function with no parms", aggregateFuncErr);
|
||||
}
|
||||
++udafcParamIdx;
|
||||
}
|
||||
break;
|
||||
@@ -3398,11 +3412,18 @@ void TupleAggregateStep::prep2PhasesAggregate(
|
||||
widthAggPm.push_back(width[colProj]);
|
||||
colAggPm++;
|
||||
// If the param is const
|
||||
if (udafc)
|
||||
{
|
||||
ConstantColumn* cc = dynamic_cast<ConstantColumn*>(udafc->aggParms()[udafcParamIdx].get());
|
||||
if (cc)
|
||||
{
|
||||
funct->fpConstCol = udafc->aggParms()[udafcParamIdx];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw QueryDataExcept("prep2PhasesAggregate: UDAF multi function with no parms", aggregateFuncErr);
|
||||
}
|
||||
++udafcParamIdx;
|
||||
}
|
||||
break;
|
||||
@@ -4257,11 +4278,18 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
|
||||
multiParmIndexes.push_back(colAggPm);
|
||||
colAggPm++;
|
||||
// If the param is const
|
||||
if (udafc)
|
||||
{
|
||||
ConstantColumn* cc = dynamic_cast<ConstantColumn*>(udafc->aggParms()[udafcParamIdx].get());
|
||||
if (cc)
|
||||
{
|
||||
funct->fpConstCol = udafc->aggParms()[udafcParamIdx];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw QueryDataExcept("prep2PhasesDistinctAggregate: UDAF multi function with no parms", aggregateFuncErr);
|
||||
}
|
||||
++udafcParamIdx;
|
||||
}
|
||||
break;
|
||||
|
@@ -10033,8 +10033,16 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
return ER_CHECK_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
// Replace the last (presumably constant) object with minSc
|
||||
if ((*coliter)->aggParms().empty())
|
||||
{
|
||||
(*coliter)->aggParms().push_back(minSc);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*coliter)->aggParms()[0] = minSc;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<FunctionColumn*>::iterator funciter;
|
||||
|
||||
|
Reference in New Issue
Block a user