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

Fixes MCOL-5700, Oracle mode test results

This changeset contains fixes in Oracle mode tests and for the
implementation of the CONCAT_ORACLE. Also, we harmonise our
translation process with the recent changes in the server.

Due to changed behavior of the server, some CREATE VIEW/EXPLAIN
statements' results begun to output unexpected results and need to be
fixed.

Also, concatenation operation's name also changed. This lead to
disabled func_concat_oracle test to be enabled to test it and it
turned out that our implementation of this function was broken
and need to be fixed too.
This commit is contained in:
Serguey Zefirov
2024-03-14 11:41:21 +03:00
parent 5f40fb32d0
commit 34acd3559b
9 changed files with 102 additions and 79 deletions

View File

@ -46,25 +46,21 @@ string Func_concat_oracle::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
{
string ret;
string tmp;
stringValue(parm[0], row, isNull, ret);
// Oracle Mode should replace NULL with "" unless all values are NULL
if (isNull)
{
ret = "";
isNull = false;
}
// 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;
// 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 = 1; id < parm.size(); id++)
for (unsigned int id = 0; id < parm.size(); id++)
{
stringValue(parm[id], row, isNull, tmp);
if (isNull)
bool tempIsNull = false;
stringValue(parm[id], row, tempIsNull, tmp);
if (!tempIsNull)
{
tmp = "";
isNull = false;
ret.append(tmp);
}
ret.append(tmp);
}
return ret;