1 | #pragma once |
---|---|
2 | |
3 | #include <Interpreters/BloomFilter.h> |
4 | #include <Storages/MergeTree/MergeTreeIndices.h> |
5 | #include <Storages/MergeTree/MergeTreeIndexGranuleBloomFilter.h> |
6 | #include <Storages/MergeTree/MergeTreeIndexAggregatorBloomFilter.h> |
7 | |
8 | namespace DB |
9 | { |
10 | |
11 | class MergeTreeIndexBloomFilter : public IMergeTreeIndex |
12 | { |
13 | public: |
14 | MergeTreeIndexBloomFilter( |
15 | const String & name_, const ExpressionActionsPtr & expr_, const Names & columns_, const DataTypes & data_types_, |
16 | const Block & header_, size_t granularity_, size_t bits_per_row_, size_t hash_functions_); |
17 | |
18 | MergeTreeIndexGranulePtr createIndexGranule() const override; |
19 | |
20 | MergeTreeIndexAggregatorPtr createIndexAggregator() const override; |
21 | |
22 | MergeTreeIndexConditionPtr createIndexCondition(const SelectQueryInfo & query_info, const Context & context) const override; |
23 | |
24 | bool mayBenefitFromIndexForIn(const ASTPtr & node) const override; |
25 | |
26 | private: |
27 | size_t bits_per_row; |
28 | size_t hash_functions; |
29 | }; |
30 | |
31 | } |
32 |