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 5092 MODA uses wrong column width for some types (#2450)
* MCOL-5092 Ensure column width is correct for datatype Change MODA return type to STRING Modify MODA to handle every numeric type * MCOL-5162 MODA to support char and varchar with collation support Fixes to the aggregate bit functions When we fixed the storage sign issue for MCOL-5092, it uncovered a problem in the bit aggregates (bit_and, bit_or and bit_xor). These aggregates should always return UBIGINT, but they relied on the type of the argument column, which gave bad results.
This commit is contained in:
@ -135,6 +135,7 @@ struct choose_policy<any>
|
||||
};
|
||||
|
||||
BIG_POLICY(int128_t);
|
||||
BIG_POLICY(long double);
|
||||
|
||||
/// Specializations for small types.
|
||||
#define SMALL_POLICY(TYPE) \
|
||||
|
@ -141,10 +141,11 @@ class Charset
|
||||
Charset(CHARSET_INFO& cs) : mCharset(&cs)
|
||||
{
|
||||
}
|
||||
Charset(CHARSET_INFO* cs) : mCharset(cs ? cs : &my_charset_bin)
|
||||
Charset(CHARSET_INFO* cs = nullptr) : mCharset(cs ? cs : &my_charset_bin)
|
||||
{
|
||||
}
|
||||
Charset(uint32_t charsetNumber);
|
||||
void setCharset(uint32_t charsetNumber);
|
||||
CHARSET_INFO& getCharset() const
|
||||
{
|
||||
return *mCharset;
|
||||
@ -157,6 +158,10 @@ class Charset
|
||||
{
|
||||
return mCharset->strnncollsp(str1.data(), str1.length(), str2.data(), str2.length()) == 0;
|
||||
}
|
||||
int strnncollsp(const std::string& str1, const std::string& str2) const
|
||||
{
|
||||
return mCharset->strnncollsp(str1.data(), str1.length(), str2.data(), str2.length());
|
||||
}
|
||||
int strnncollsp(const utils::ConstString& str1, const utils::ConstString& str2) const
|
||||
{
|
||||
return mCharset->strnncollsp(str1.str(), str1.length(), str2.str(), str2.length());
|
||||
|
@ -29,4 +29,10 @@ Charset::Charset(uint32_t charsetNumber) : mCharset(&get_charset_or_bin(charsetN
|
||||
{
|
||||
}
|
||||
|
||||
void Charset::setCharset(uint32_t charsetNumber)
|
||||
{
|
||||
mCharset = &get_charset_or_bin(charsetNumber);
|
||||
}
|
||||
|
||||
} // namespace datatypes
|
||||
|
||||
|
Reference in New Issue
Block a user