You've already forked mariadb-columnstore-engine
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:
@ -16,10 +16,10 @@
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/****************************************************************************
|
||||
* $Id: func_ucase.cpp 3923 2013-06-19 21:43:06Z bwilkinson $
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
* $Id: func_ucase.cpp 3923 2013-06-19 21:43:06Z bwilkinson $
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
@ -34,47 +34,43 @@ using namespace rowgroup;
|
||||
#include "joblisttypes.h"
|
||||
using namespace joblist;
|
||||
|
||||
|
||||
class to_upper
|
||||
{
|
||||
public:
|
||||
char operator() (char c) const // notice the return type
|
||||
{
|
||||
return toupper(c);
|
||||
}
|
||||
public:
|
||||
char operator()(char c) const // notice the return type
|
||||
{
|
||||
return toupper(c);
|
||||
}
|
||||
};
|
||||
|
||||
namespace funcexp
|
||||
{
|
||||
CalpontSystemCatalog::ColType Func_ucase::operationType(FunctionParm& fp, CalpontSystemCatalog::ColType& resultType)
|
||||
CalpontSystemCatalog::ColType Func_ucase::operationType(FunctionParm& fp,
|
||||
CalpontSystemCatalog::ColType& resultType)
|
||||
{
|
||||
// operation type is not used by this functor
|
||||
return fp[0]->data()->resultType();
|
||||
// operation type is not used by this functor
|
||||
return fp[0]->data()->resultType();
|
||||
}
|
||||
|
||||
std::string Func_ucase::getStrVal(rowgroup::Row& row,
|
||||
FunctionParm& fp,
|
||||
bool& isNull,
|
||||
std::string Func_ucase::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
|
||||
execplan::CalpontSystemCatalog::ColType& colType)
|
||||
{
|
||||
const string& tstr = fp[0]->data()->getStrVal(row, isNull);
|
||||
const string& tstr = fp[0]->data()->getStrVal(row, isNull);
|
||||
|
||||
if (isNull)
|
||||
return "";
|
||||
if (isNull)
|
||||
return "";
|
||||
|
||||
CHARSET_INFO* cs = colType.getCharset();
|
||||
uint64_t inLen = tstr.length();
|
||||
uint64_t bufLen= inLen * cs->caseup_multiply;
|
||||
char* outBuf = new char[bufLen];
|
||||
|
||||
uint64_t outLen = cs->caseup(tstr.c_str(), inLen, outBuf, bufLen);
|
||||
CHARSET_INFO* cs = colType.getCharset();
|
||||
uint64_t inLen = tstr.length();
|
||||
uint64_t bufLen = inLen * cs->caseup_multiply;
|
||||
char* outBuf = new char[bufLen];
|
||||
|
||||
string ret = string(outBuf, outLen);
|
||||
delete [] outBuf;
|
||||
return ret;
|
||||
uint64_t outLen = cs->caseup(tstr.c_str(), inLen, outBuf, bufLen);
|
||||
|
||||
string ret = string(outBuf, outLen);
|
||||
delete[] outBuf;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
} // namespace funcexp
|
||||
} // namespace funcexp
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
|
Reference in New Issue
Block a user