1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Revert "Fixes MCOL-5700, Oracle mode test results"

This commit is contained in:
Leonid Fedorov
2024-03-27 18:52:30 +04:00
committed by GitHub
parent 56b35d5cf6
commit af5ae35413
9 changed files with 79 additions and 102 deletions

View File

@ -46,21 +46,25 @@ string Func_concat_oracle::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
{
string ret;
string tmp;
// we default to true as any non-NULL operand will reset it to false
// and all NULL operands will leave it as true, which is intended.
isNull = true;
stringValue(parm[0], row, isNull, ret);
// Oracle Mode should replace NULL with "" unless all values are NULL
if (isNull)
{
ret = "";
isNull = false;
}
// TODO: do a better job of cutting down the number re-allocations.
// look at Item_func_concat::realloc_result for ideas and use
// std::string:resize() appropriatly.
for (unsigned int id = 0; id < parm.size(); id++)
for (unsigned int id = 1; id < parm.size(); id++)
{
bool tempIsNull = false;
stringValue(parm[id], row, tempIsNull, tmp);
if (!tempIsNull)
stringValue(parm[id], row, isNull, tmp);
if (isNull)
{
tmp = "";
isNull = false;
ret.append(tmp);
}
ret.append(tmp);
}
return ret;