1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-979 getNullValueByType() should return string for all char types

This commit is contained in:
David Hall
2017-10-26 10:52:10 -05:00
parent 4985f3456e
commit 4870e5abdc
2 changed files with 6 additions and 3 deletions

View File

@ -123,7 +123,7 @@ void WF_lead_lag<T>::parseParms(const std::vector<execplan::SRCP>& parms)
fLead = 1; fLead = 1;
fRespectNulls = true; fRespectNulls = true;
fDefNull = false; fDefNull = false;
fDefault = (T)0; // fDefault = (T)0; // Won't work for std::string. Default should always be set below.
fOffsetNull = false; fOffsetNull = false;
fOffset = 0; fOffset = 0;
if (fFunctionId == WF__LAG) if (fFunctionId == WF__LAG)

View File

@ -497,7 +497,8 @@ void* WindowFunctionType::getNullValueByType(int ct, int pos)
break; break;
case CalpontSystemCatalog::CHAR: case CalpontSystemCatalog::CHAR:
case CalpontSystemCatalog::VARCHAR: { case CalpontSystemCatalog::VARCHAR: {
uint64_t len = fRow.getColumnWidth(pos); // uint64_t len = fRow.getColumnWidth(pos);
#if 0
switch (len) { switch (len) {
case 1: case 1:
v = &char1Null; v = &char1Null;
@ -515,10 +516,12 @@ void* WindowFunctionType::getNullValueByType(int ct, int pos)
case 8: case 8:
v = &char8Null; v = &char8Null;
break; break;
default: default:
v = &stringNull; v = &stringNull;
break; break;
} }
#endif
v = &stringNull;
break; break;
} }
case CalpontSystemCatalog::DECIMAL: case CalpontSystemCatalog::DECIMAL: