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

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -26,63 +26,58 @@ using namespace rowgroup;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_quote::operationType(FunctionParm& fp, CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_quote::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
return resultType;
}
std::string Func_quote::getStrVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
std::string Func_quote::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
{
string str;
string str;
stringValue(fp[0], row, isNull, str);
stringValue(fp[0], row, isNull, str);
if (isNull)
if (isNull)
{
isNull = false;
return "NULL";
}
if (str.empty())
return "NULL";
string result;
result.reserve((str.size() * 1.3) + 2);
result.push_back('\'');
for (uint64_t i = 0; i < str.size(); i++)
{
switch (str[i])
{
isNull = false;
return "NULL";
case 0:
result.push_back('\\');
result.push_back('0');
break;
case '\032':
result.push_back('\\');
result.push_back('Z');
break;
case '\'':
case '\\':
result.push_back('\\');
result.push_back(str[i]);
break;
default: result.push_back(str[i]); break;
}
}
if (str.empty())
return "NULL";
result.push_back('\'');
string result;
result.reserve((str.size() * 1.3) + 2);
result.push_back('\'');
for (uint64_t i = 0; i < str.size(); i++)
{
switch(str[i])
{
case 0:
result.push_back('\\');
result.push_back('0');
break;
case '\032':
result.push_back('\\');
result.push_back('Z');
break;
case '\'':
case '\\':
result.push_back('\\');
result.push_back(str[i]);
break;
default:
result.push_back(str[i]);
break;
}
}
result.push_back('\'');
return result;
return result;
}
} // namespace funcexp
} // namespace funcexp
// vim:ts=4 sw=4: