You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-3536 collation
This commit is contained in:
@ -369,6 +369,11 @@ public:
|
||||
|
||||
EXPORT mcsv1Context& operator=(const mcsv1Context& rhs);
|
||||
EXPORT mcsv1Context& copy(const mcsv1Context& rhs);
|
||||
|
||||
// Character collation support
|
||||
EXPORT void setCharsetNumber(uint32_t csNum);
|
||||
EXPORT uint32_t getCharsetNumber(); // Returns the unique ID for the language/collation
|
||||
EXPORT CHARSET_INFO* getCharset();
|
||||
|
||||
private:
|
||||
|
||||
@ -392,6 +397,7 @@ private:
|
||||
int32_t fParamCount;
|
||||
std::vector<uint32_t> paramKeys;
|
||||
enum_mariadb_return_type mariadbReturnType;
|
||||
uint32_t fCharsetNumber;
|
||||
|
||||
public:
|
||||
// For use by the framework
|
||||
@ -416,6 +422,7 @@ public:
|
||||
EXPORT void setParamCount(int32_t paramCount);
|
||||
std::vector<uint32_t>* getParamKeys();
|
||||
EXPORT void setMariaDBReturnType(enum_mariadb_return_type rt);
|
||||
|
||||
};
|
||||
|
||||
// Since aggregate functions can operate on any data type, we use the following structure
|
||||
@ -438,7 +445,9 @@ struct ColumnDatum
|
||||
uint32_t scale; // If dataType is a DECIMAL type
|
||||
uint32_t precision; // If dataType is a DECIMAL type
|
||||
std::string alias; // Only filled in for init()
|
||||
ColumnDatum() : dataType(execplan::CalpontSystemCatalog::UNDEFINED), scale(0), precision(-1) {};
|
||||
uint32_t charsetNumber; // For string collations
|
||||
ColumnDatum() : dataType(execplan::CalpontSystemCatalog::UNDEFINED),
|
||||
scale(0), precision(-1), charsetNumber(8) {};
|
||||
};
|
||||
|
||||
// Override mcsv1_UDAF to build your User Defined Aggregate (UDAF) and/or
|
||||
@ -658,7 +667,8 @@ inline mcsv1Context::mcsv1Context() :
|
||||
fStartConstant(0),
|
||||
fEndConstant(0),
|
||||
func(NULL),
|
||||
fParamCount(0)
|
||||
fParamCount(0),
|
||||
fCharsetNumber(8) // Latin1
|
||||
{
|
||||
}
|
||||
|
||||
@ -683,6 +693,7 @@ inline mcsv1Context& mcsv1Context::copy(const mcsv1Context& rhs)
|
||||
bInterrupted = rhs.bInterrupted; // Multiple threads will use the same reference
|
||||
func = rhs.func;
|
||||
fParamCount = rhs.fParamCount;
|
||||
fCharsetNumber = rhs.fCharsetNumber;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -979,6 +990,16 @@ inline void mcsv1Context::setMariaDBReturnType(enum_mariadb_return_type rt)
|
||||
mariadbReturnType = rt;
|
||||
}
|
||||
|
||||
inline void mcsv1Context::setCharsetNumber(uint32_t csNum)
|
||||
{
|
||||
fCharsetNumber=csNum;
|
||||
}
|
||||
|
||||
inline uint32_t mcsv1Context::getCharsetNumber()
|
||||
{
|
||||
return fCharsetNumber;
|
||||
}
|
||||
|
||||
inline mcsv1_UDAF::ReturnCode mcsv1_UDAF::dropValue(mcsv1Context* context, ColumnDatum* valsDropped)
|
||||
{
|
||||
return NOT_IMPLEMENTED;
|
||||
|
Reference in New Issue
Block a user