You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Merge pull request #777 from mariadb-corporation/MCOL-3304
MCOL-3304 During prepAggregate, if you set type to LONGDOUBLE, set sc…
This commit is contained in:
@ -386,6 +386,7 @@ void WindowFunctionColumn::adjustResultType()
|
|||||||
fResultType.colDataType = CalpontSystemCatalog::LONGDOUBLE;
|
fResultType.colDataType = CalpontSystemCatalog::LONGDOUBLE;
|
||||||
fResultType.colWidth = sizeof(long double);
|
fResultType.colWidth = sizeof(long double);
|
||||||
fResultType.precision = -1;
|
fResultType.precision = -1;
|
||||||
|
fResultType.scale = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1406,7 +1406,7 @@ void TupleAggregateStep::prep1PhaseAggregate(
|
|||||||
typeAgg.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
typeAgg.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
||||||
precisionAgg.push_back(-1);
|
precisionAgg.push_back(-1);
|
||||||
widthAgg.push_back(sizeof(long double));
|
widthAgg.push_back(sizeof(long double));
|
||||||
scaleAgg.push_back(scaleProj[colProj]);
|
scaleAgg.push_back(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1935,7 +1935,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
|
|||||||
typeAgg.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
typeAgg.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
||||||
precisionAgg.push_back(-1);
|
precisionAgg.push_back(-1);
|
||||||
widthAgg.push_back(sizeof(long double));
|
widthAgg.push_back(sizeof(long double));
|
||||||
scaleAgg.push_back(scaleProj[colProj]);
|
scaleAgg.push_back(0);
|
||||||
colAgg++;
|
colAgg++;
|
||||||
|
|
||||||
// has distinct step, put the count column for avg next to the sum
|
// has distinct step, put the count column for avg next to the sum
|
||||||
@ -2255,7 +2255,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
|
|||||||
typeAggDist.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
typeAggDist.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
||||||
precisionAggDist.push_back(-1);
|
precisionAggDist.push_back(-1);
|
||||||
widthAggDist.push_back(sizeof(long double));
|
widthAggDist.push_back(sizeof(long double));
|
||||||
scaleAggDist.push_back(scaleProj[colAgg]);
|
scaleAggDist.push_back(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2327,10 +2327,10 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
|
|||||||
{
|
{
|
||||||
oidsAggDist.push_back(oidsAgg[colAgg]);
|
oidsAggDist.push_back(oidsAgg[colAgg]);
|
||||||
keysAggDist.push_back(retKey);
|
keysAggDist.push_back(retKey);
|
||||||
scaleAggDist.push_back(scaleAgg[colAgg] >> 8);
|
scaleAggDist.push_back(0);
|
||||||
precisionAggDist.push_back(precisionAgg[colAgg]);
|
typeAggDist.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
||||||
typeAggDist.push_back(typeAgg[colAgg]);
|
precisionAggDist.push_back(-1);
|
||||||
widthAggDist.push_back(widthAgg[colAgg]);
|
widthAggDist.push_back(sizeof(long double));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3173,7 +3173,7 @@ void TupleAggregateStep::prep2PhasesAggregate(
|
|||||||
oidsAggPm.push_back(oidsProj[colProj]);
|
oidsAggPm.push_back(oidsProj[colProj]);
|
||||||
keysAggPm.push_back(aggKey);
|
keysAggPm.push_back(aggKey);
|
||||||
typeAggPm.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
typeAggPm.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
||||||
scaleAggPm.push_back(scaleProj[colProj]);
|
scaleAggPm.push_back(0);
|
||||||
precisionAggPm.push_back(-1);
|
precisionAggPm.push_back(-1);
|
||||||
widthAggPm.push_back(sizeof(long double));
|
widthAggPm.push_back(sizeof(long double));
|
||||||
colAggPm++;
|
colAggPm++;
|
||||||
@ -3449,10 +3449,10 @@ void TupleAggregateStep::prep2PhasesAggregate(
|
|||||||
{
|
{
|
||||||
oidsAggUm.push_back(oidsAggPm[colPm]);
|
oidsAggUm.push_back(oidsAggPm[colPm]);
|
||||||
keysAggUm.push_back(retKey);
|
keysAggUm.push_back(retKey);
|
||||||
scaleAggUm.push_back(scaleAggPm[colPm] >> 8);
|
scaleAggUm.push_back(0);
|
||||||
precisionAggUm.push_back(precisionAggPm[colPm]);
|
typeAggUm.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
||||||
typeAggUm.push_back(typeAggPm[colPm]);
|
precisionAggUm.push_back(-1);
|
||||||
widthAggUm.push_back(widthAggPm[colPm]);
|
widthAggUm.push_back(sizeof(long double));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -4027,7 +4027,7 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
|
|||||||
typeAggPm.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
typeAggPm.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
||||||
precisionAggPm.push_back(-1);
|
precisionAggPm.push_back(-1);
|
||||||
widthAggPm.push_back(sizeof(long double));
|
widthAggPm.push_back(sizeof(long double));
|
||||||
scaleAggPm.push_back(scaleProj[colProj]);
|
scaleAggPm.push_back(0);
|
||||||
colAggPm++;
|
colAggPm++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4394,7 +4394,7 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
|
|||||||
typeAggDist.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
typeAggDist.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
||||||
precisionAggDist.push_back(-1);
|
precisionAggDist.push_back(-1);
|
||||||
widthAggDist.push_back(sizeof(long double));
|
widthAggDist.push_back(sizeof(long double));
|
||||||
scaleAggDist.push_back(scaleAggUm[colUm]);
|
scaleAggDist.push_back(0);
|
||||||
}
|
}
|
||||||
// PM: put the count column for avg next to the sum
|
// PM: put the count column for avg next to the sum
|
||||||
// let fall through to add a count column for average function
|
// let fall through to add a count column for average function
|
||||||
@ -4456,10 +4456,10 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
|
|||||||
{
|
{
|
||||||
oidsAggDist.push_back(oidsAggUm[colUm]);
|
oidsAggDist.push_back(oidsAggUm[colUm]);
|
||||||
keysAggDist.push_back(retKey);
|
keysAggDist.push_back(retKey);
|
||||||
scaleAggDist.push_back(scaleAggUm[colUm] >> 8);
|
scaleAggDist.push_back(0);
|
||||||
precisionAggDist.push_back(precisionAggUm[colUm]);
|
typeAggDist.push_back(CalpontSystemCatalog::LONGDOUBLE);
|
||||||
typeAggDist.push_back(typeAggUm[colUm]);
|
precisionAggDist.push_back(-1);
|
||||||
widthAggDist.push_back(widthAggUm[colUm]);
|
widthAggDist.push_back(sizeof(long double));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user