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

MCOL-5153 This patch replaces MDB collation aware hash function with the (#2488)

exact functionality that does not use MDB hash function.
This patch also takes a bit from Robin Hood hash map implementation forgotten
that reduces hash function collision rate.
This commit is contained in:
Roman Nozdrin
2022-08-07 02:36:03 +03:00
committed by GitHub
parent af9caf8d6e
commit dd96e686c0
4 changed files with 59 additions and 15 deletions

View File

@ -136,8 +136,7 @@ class Charset
protected:
const struct charset_info_st* mCharset;
private:
static constexpr uint flags_ = MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN;
static constexpr const uint flags_ = MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN;
public:
Charset(CHARSET_INFO& cs) : mCharset(&cs)
{
@ -209,6 +208,10 @@ class Charset
assert(len <= sizeof(T));
return ret;
}
static uint getDefaultFlags()
{
return flags_;
}
};
class CollationAwareHasher : public Charset