You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-4580 extent elimination for dictionary-based text/varchar types
The idea is relatively simple - encode prefixes of collated strings as integers and use them to compute extents' ranges. Then we can eliminate extents with strings. The actual patch does have all the code there but miss one important step: we do not keep collation index, we keep charset index. Because of this, some of the tests in the bugfix suite fail and thus main functionality is turned off. The reason of this patch to be put into PR at all is that it contains changes that made CHAR/VARCHAR columns unsigned. This change is needed in vectorization work.
This commit is contained in:
@ -31,6 +31,7 @@ using namespace std;
|
||||
#include "messageobj.h"
|
||||
#include "exceptclasses.h"
|
||||
#include "dataconvert.h"
|
||||
#include "string_prefixes.h"
|
||||
#include <sstream>
|
||||
|
||||
using namespace logging;
|
||||
@ -391,8 +392,13 @@ void PrimitiveProcessor::nextSig(int NVALS, const PrimToken* tokens, p_DataValue
|
||||
}
|
||||
|
||||
void PrimitiveProcessor::p_Dictionary(const DictInput* in, vector<uint8_t>* out, bool skipNulls,
|
||||
#if defined(XXX_PRIMITIVES_TOKEN_RANGES_XXX)
|
||||
uint32_t charsetNumber, boost::shared_ptr<DictEqualityFilter> eqFilter,
|
||||
uint8_t eqOp, uint64_t minMax[2])
|
||||
#else
|
||||
uint32_t charsetNumber, boost::shared_ptr<DictEqualityFilter> eqFilter,
|
||||
uint8_t eqOp)
|
||||
#endif
|
||||
{
|
||||
PrimToken* outToken;
|
||||
const DictFilterElement* filter = 0;
|
||||
@ -437,6 +443,14 @@ void PrimitiveProcessor::p_Dictionary(const DictInput* in, vector<uint8_t>* out,
|
||||
sigptr.len != -1;
|
||||
nextSig(in->NVALS, in->tokens, &sigptr, in->OutputType, (in->InputFlags ? true : false), skipNulls))
|
||||
{
|
||||
#if defined(XXX_PRIMITIVES_TOKEN_RANGES_XXX)
|
||||
if (minMax)
|
||||
{
|
||||
uint64_t v = encodeStringPrefix_check_null(sigptr.data, sigptr.len, charsetNumber);
|
||||
minMax[1] = minMax[1] < v ? v : minMax[1];
|
||||
minMax[0] = minMax[0] > v ? v : minMax[0];
|
||||
}
|
||||
#endif
|
||||
// do aggregate processing
|
||||
if (in->OutputType & OT_AGGREGATE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user