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
feat(extent-elimination)!: re-enable extent-elimination for dictionary columns scanning
This is "productization" of an old code that would enable extent elimination for dictionary columns. This concrete patch enables it, fixes perfomance degradation (main problem with old code) and also fixes incorrect behavior of cpimport.
This commit is contained in:
@ -24,10 +24,9 @@
|
||||
#include "string_prefixes.h"
|
||||
|
||||
// XXX: string (or, actually, a BLOB) with all NUL chars will be encoded into zero. Which corresponds to
|
||||
// encoding of empty string, or NULL.
|
||||
int64_t encodeStringPrefix(const uint8_t* str, size_t len, int charsetNumber)
|
||||
// encoding of empty string.
|
||||
int64_t encodeStringPrefix(const uint8_t* str, size_t len, datatypes::Charset& cset)
|
||||
{
|
||||
datatypes::Charset cset(charsetNumber);
|
||||
uint8_t fixedLenPrefix[8];
|
||||
memset(fixedLenPrefix, 0, sizeof(fixedLenPrefix));
|
||||
cset.strnxfrm(fixedLenPrefix, sizeof(fixedLenPrefix), 8, str, len, 0);
|
||||
@ -41,11 +40,11 @@ int64_t encodeStringPrefix(const uint8_t* str, size_t len, int charsetNumber)
|
||||
return acc;
|
||||
}
|
||||
|
||||
int64_t encodeStringPrefix_check_null(const uint8_t* str, size_t len, int charsetNumber)
|
||||
int64_t encodeStringPrefix_check_null(const uint8_t* str, size_t len, datatypes::Charset& cset)
|
||||
{
|
||||
if (len < 1)
|
||||
if (len < 1 && str == nullptr)
|
||||
{
|
||||
return joblist::UBIGINTNULL;
|
||||
}
|
||||
return encodeStringPrefix(str, len, charsetNumber);
|
||||
return encodeStringPrefix(str, len, cset);
|
||||
}
|
||||
|
Reference in New Issue
Block a user