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
This patch introduces support for scanning/filtering vectorized execution for numeric-based
data types TEXT, CHAR, VARCHAR, FLOAT and DOUBLE are not yet supported by vectorized path This patch introduces an example for Google benchmarking suite to measure a perf diff b/w legacy scan/filtering code and the templated version
This commit is contained in:
committed by
Roman Nozdrin
parent
cac23b0afc
commit
af36f9940f
@ -165,17 +165,19 @@ struct IntegralTypeToFilterSetType<int128_t>
|
||||
class ParsedColumnFilter
|
||||
{
|
||||
public:
|
||||
static constexpr uint32_t noSetFilterThreshold = 8;
|
||||
using CopsType = uint8_t;
|
||||
using RFsType = uint8_t;
|
||||
static constexpr uint32_t noSetFilterThreshold = 8;
|
||||
ColumnFilterMode columnFilterMode;
|
||||
boost::shared_array<int64_t> prestored_argVals;
|
||||
boost::shared_array<int128_t> prestored_argVals128;
|
||||
boost::shared_array<uint8_t> prestored_cops;
|
||||
boost::shared_array<CopsType> prestored_cops;
|
||||
boost::shared_array<uint8_t> prestored_rfs;
|
||||
boost::shared_ptr<prestored_set_t> prestored_set;
|
||||
boost::shared_ptr<prestored_set_t_128> prestored_set_128;
|
||||
|
||||
ParsedColumnFilter();
|
||||
ParsedColumnFilter(const uint32_t aFilterCount);
|
||||
ParsedColumnFilter(const uint32_t aFilterCount, const int BOP);
|
||||
~ParsedColumnFilter();
|
||||
|
||||
template<typename T,
|
||||
@ -259,8 +261,19 @@ class ParsedColumnFilter
|
||||
prestored_set->insert(prestored_argVals[argIndex]);
|
||||
}
|
||||
|
||||
inline int getBOP() const
|
||||
{
|
||||
return mBOP;
|
||||
}
|
||||
|
||||
inline int getFilterCount() const
|
||||
{
|
||||
return mFilterCount;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32_t mFilterCount;
|
||||
int mBOP;
|
||||
};
|
||||
|
||||
//@bug 1828 These need to be public so that column operations can use it for 'like'
|
||||
@ -400,7 +413,6 @@ public:
|
||||
template<typename T,
|
||||
typename std::enable_if<sizeof(T) == sizeof(int64_t), T>::type* = nullptr>
|
||||
void scanAndFilterTypeDispatcher(NewColRequestHeader* in, ColResultHeader* out);
|
||||
|
||||
template<typename T,
|
||||
typename std::enable_if<sizeof(T) <= sizeof(int64_t), T>::type* = nullptr>
|
||||
void _scanAndFilterTypeDispatcher(NewColRequestHeader* in, ColResultHeader* out);
|
||||
@ -433,7 +445,7 @@ public:
|
||||
// void p_ColAggregate(const NewColAggRequestHeader *in, NewColAggResultHeader *out);
|
||||
|
||||
void p_Dictionary(const DictInput* in, std::vector<uint8_t>* out,
|
||||
bool skipNulls, uint32_t charsetNumber,
|
||||
bool skipNulls, uint32_t charsetNumber,
|
||||
boost::shared_ptr<DictEqualityFilter> eqFilter,
|
||||
uint8_t eqOp);
|
||||
|
||||
@ -492,7 +504,7 @@ boost::shared_ptr<ParsedColumnFilter> _parseColumnFilter(
|
||||
|
||||
// Allocate the compiled filter structure with space for filterCount filters.
|
||||
// No need to init arrays since they will be filled on the fly.
|
||||
ret.reset(new ParsedColumnFilter(filterCount));
|
||||
ret.reset(new ParsedColumnFilter(filterCount, BOP));
|
||||
ret->allocateSpaceForFilterArgs<T>();
|
||||
|
||||
// Choose initial filter mode based on operation and number of filter elements
|
||||
|
Reference in New Issue
Block a user