You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4171 Some fixes
This commit is contained in:
committed by
Roman Nozdrin
parent
5b8aba0005
commit
af80081c94
@ -191,12 +191,15 @@ void WF_lead_lag<T>::parseParms(const std::vector<execplan::SRCP>& parms)
|
||||
|
||||
// parms[3]: respect null | ignore null
|
||||
cc = dynamic_cast<ConstantColumn*>(parms[3].get());
|
||||
idbassert(cc != NULL);
|
||||
bool isNull = false; // dummy, harded coded
|
||||
fRespectNulls = (cc->getIntVal(fRow, isNull) > 0);
|
||||
if (cc != NULL)
|
||||
{
|
||||
bool isNull = false; // dummy. Return not used
|
||||
fRespectNulls = (cc->getIntVal(fRow, isNull) > 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename T>
|
||||
void WF_lead_lag<T>::operator()(int64_t b, int64_t e, int64_t c)
|
||||
{
|
||||
@ -220,13 +223,7 @@ void WF_lead_lag<T>::operator()(int64_t b, int64_t e, int64_t c)
|
||||
if (!fOffsetNull)
|
||||
{
|
||||
implicit2T(idx, tmp, 0);
|
||||
|
||||
if (tmp > e) // prevent integer overflow
|
||||
tmp = e + 1;
|
||||
else if (tmp + e < 0)
|
||||
tmp += e - 1;
|
||||
|
||||
fOffset = (int64_t) tmp;
|
||||
fOffset = round(tmp);
|
||||
fOffset *= fLead;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user