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,10 +1505,17 @@ void TupleAggregateStep::prep1PhaseAggregate(
|
||||
typeAgg.push_back(typeProj[colProj]);
|
||||
widthAgg.push_back(width[colProj]);
|
||||
// If the param is const
|
||||
ConstantColumn* cc = dynamic_cast<ConstantColumn*>(udafc->aggParms()[udafcParamIdx].get());
|
||||
if (cc)
|
||||
if (udafc)
|
||||
{
|
||||
funct->fpConstCol = udafc->aggParms()[udafcParamIdx];
|
||||
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;
|
||||
}
|
||||
@@ -2123,10 +2130,17 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
|
||||
multiParmIndexes.push_back(colAgg);
|
||||
++colAgg;
|
||||
// If the param is const
|
||||
ConstantColumn* cc = dynamic_cast<ConstantColumn*>(udafc->aggParms()[udafcParamIdx].get());
|
||||
if (cc)
|
||||
if (udafc)
|
||||
{
|
||||
funct->fpConstCol = udafc->aggParms()[udafcParamIdx];
|
||||
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;
|
||||
}
|
||||
@@ -3398,10 +3412,17 @@ void TupleAggregateStep::prep2PhasesAggregate(
|
||||
widthAggPm.push_back(width[colProj]);
|
||||
colAggPm++;
|
||||
// If the param is const
|
||||
ConstantColumn* cc = dynamic_cast<ConstantColumn*>(udafc->aggParms()[udafcParamIdx].get());
|
||||
if (cc)
|
||||
if (udafc)
|
||||
{
|
||||
funct->fpConstCol = udafc->aggParms()[udafcParamIdx];
|
||||
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;
|
||||
}
|
||||
@@ -4257,10 +4278,17 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
|
||||
multiParmIndexes.push_back(colAggPm);
|
||||
colAggPm++;
|
||||
// If the param is const
|
||||
ConstantColumn* cc = dynamic_cast<ConstantColumn*>(udafc->aggParms()[udafcParamIdx].get());
|
||||
if (cc)
|
||||
if (udafc)
|
||||
{
|
||||
funct->fpConstCol = udafc->aggParms()[udafcParamIdx];
|
||||
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;
|
||||
}
|
||||
|
@@ -4165,7 +4165,7 @@ ReturnedColumn* buildAggregateColumn(Item* item, gp_walk_info& gwi)
|
||||
rowCol->columnVec(selCols);
|
||||
(dynamic_cast<GroupConcatColumn*>(ac))->orderCols(orderCols);
|
||||
parm.reset(rowCol);
|
||||
ac->aggParms().push_back(parm);
|
||||
ac->aggParms().push_back(parm);
|
||||
|
||||
if (gc->str_separator())
|
||||
{
|
||||
@@ -4311,15 +4311,15 @@ ReturnedColumn* buildAggregateColumn(Item* item, gp_walk_info& gwi)
|
||||
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_AGG_ARGS, args);
|
||||
}
|
||||
|
||||
if (ac)
|
||||
delete ac;
|
||||
if (ac)
|
||||
delete ac;
|
||||
return NULL;
|
||||
}
|
||||
if (parm)
|
||||
{
|
||||
// MCOL-1201 multi-argument aggregate
|
||||
ac->aggParms().push_back(parm);
|
||||
}
|
||||
if (parm)
|
||||
{
|
||||
// MCOL-1201 multi-argument aggregate
|
||||
ac->aggParms().push_back(parm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10033,7 +10033,15 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
|
||||
return ER_CHECK_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
(*coliter)->aggParms().push_back(minSc);
|
||||
// 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