mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 22:22:00 +00:00
Code clean up
This commit is contained in:
parent
1d9bf9962c
commit
514e17d037
@ -17,7 +17,7 @@ namespace ErrorCodes
|
||||
extern const int LOGICAL_ERROR;
|
||||
};
|
||||
|
||||
UInt16 Arc::serialize(WriteBuffer& write_buffer)
|
||||
UInt16 Arc::serialize(WriteBuffer& write_buffer) const
|
||||
{
|
||||
UInt16 written_bytes = 0;
|
||||
bool has_output = output != 0;
|
||||
@ -71,8 +71,7 @@ int ArcsBitmap::getIndex(char label) const
|
||||
int ArcsBitmap::getArcNum() const
|
||||
{
|
||||
int bit_count = 0;
|
||||
for (size_t i = 0; i < 4; i++)
|
||||
for (unsigned long item : data.items)
|
||||
for (uint64_t item : data.items)
|
||||
{
|
||||
if (item)
|
||||
bit_count += PopCountImpl(item);
|
||||
|
@ -24,7 +24,7 @@ struct Arc
|
||||
Output output{0};
|
||||
StatePtr target;
|
||||
|
||||
UInt16 serialize(WriteBuffer& write_buffer);
|
||||
UInt16 serialize(WriteBuffer& write_buffer) const;
|
||||
};
|
||||
|
||||
class ArcsBitmap
|
||||
|
@ -208,13 +208,14 @@ bool GinFilter::contains(const GinFilter & af, PostingsCacheForStore &cache_stor
|
||||
if (postings_cache == nullptr)
|
||||
{
|
||||
GinIndexStoreReader reader(cache_store.store);
|
||||
|
||||
postings_cache = reader.loadPostingsIntoCache(af.getTerms());
|
||||
cache_store.cache[af.getMatchString()] = postings_cache;
|
||||
}
|
||||
|
||||
if (match(postings_cache))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
|
||||
explicit GinFilter(const GinFilterParameters& params);
|
||||
|
||||
void add(const char* data, size_t len, UInt32 rowID, GinIndexStorePtr& store);
|
||||
static void add(const char* data, size_t len, UInt32 rowID, GinIndexStorePtr& store);
|
||||
|
||||
void addRowRangeToGinFilter(UInt32 segmentID, UInt32 rowIDStart, UInt32 rowIDEnd);
|
||||
|
||||
|
@ -29,7 +29,7 @@ bool GinIndexPostingsBuilder::contains(UInt32 row_id) const
|
||||
if (useRoaring())
|
||||
return bmp.contains(row_id);
|
||||
|
||||
const auto it(std::find(lst.begin(), lst.begin()+lst_length, row_id));
|
||||
const auto *const it(std::find(lst.begin(), lst.begin()+lst_length, row_id));
|
||||
return it != lst.begin()+lst_length;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user