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 #1619 from tntnatbry/MCOL-4188-bps-wf-fix
MCOL-4188 Regression fixes for MCOL-641.
This commit is contained in:
@ -703,6 +703,12 @@ bool BatchPrimitiveProcessorJL::countThisMsg(messageqcpp::ByteStream& in) const
|
|||||||
const uint8_t* data = in.buf();
|
const uint8_t* data = in.buf();
|
||||||
uint32_t offset = sizeof(ISMPacketHeader) + sizeof(PrimitiveHeader); // skip the headers
|
uint32_t offset = sizeof(ISMPacketHeader) + sizeof(PrimitiveHeader); // skip the headers
|
||||||
|
|
||||||
|
ISMPacketHeader* hdr = (ISMPacketHeader*)(data);
|
||||||
|
|
||||||
|
// Exit early if PrimProc has thrown an exception
|
||||||
|
if (hdr->Status > 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (_hasScan)
|
if (_hasScan)
|
||||||
{
|
{
|
||||||
if (data[offset] != 0)
|
if (data[offset] != 0)
|
||||||
|
@ -189,8 +189,7 @@ void WF_stats<T>::operator()(int64_t b, int64_t e, int64_t c)
|
|||||||
fCount++;
|
fCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fCount > 0) &&
|
if (fCount > 1)
|
||||||
!(fCount == 1 && (fFunctionId == WF__STDDEV_SAMP || fFunctionId == WF__VAR_SAMP)))
|
|
||||||
{
|
{
|
||||||
int scale = fRow.getScale(colIn);
|
int scale = fRow.getScale(colIn);
|
||||||
long double factor = pow(10.0, scale);
|
long double factor = pow(10.0, scale);
|
||||||
@ -225,9 +224,17 @@ void WF_stats<T>::operator()(int64_t b, int64_t e, int64_t c)
|
|||||||
{
|
{
|
||||||
setValue(CalpontSystemCatalog::DOUBLE, b, e, c, (double*) NULL);
|
setValue(CalpontSystemCatalog::DOUBLE, b, e, c, (double*) NULL);
|
||||||
}
|
}
|
||||||
else if (fCount == 1 && (fFunctionId == WF__STDDEV_SAMP || fFunctionId == WF__VAR_SAMP))
|
else if (fCount == 1)
|
||||||
{
|
{
|
||||||
setValue(CalpontSystemCatalog::DOUBLE, b, e, c, (double*) NULL);
|
if (fFunctionId == WF__STDDEV_SAMP || fFunctionId == WF__VAR_SAMP)
|
||||||
|
{
|
||||||
|
setValue(CalpontSystemCatalog::DOUBLE, b, e, c, (double*) NULL);
|
||||||
|
}
|
||||||
|
else // fFunctionId == WF__STDDEV_POP || fFunctionId == WF__VAR_POP
|
||||||
|
{
|
||||||
|
double temp = 0.0;
|
||||||
|
setValue(CalpontSystemCatalog::DOUBLE, b, e, c, (double*) &temp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user