Skip to content

Commit 9dd528d

Browse files
address comments
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
1 parent 077c92a commit 9dd528d

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

dbms/src/Storages/DeltaMerge/BitmapFilter/BitmapFilter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void BitmapFilter::rangeAnd(IColumn::Filter & f, UInt32 start, UInt32 limit) con
9797
}
9898
}
9999

100-
void BitmapFilter::merge(const BitmapFilter & other)
100+
void BitmapFilter::logicalOr(const BitmapFilter & other)
101101
{
102102
RUNTIME_CHECK(filter.size() == other.filter.size());
103103
if (all_match)
@@ -108,9 +108,10 @@ void BitmapFilter::merge(const BitmapFilter & other)
108108
{
109109
filter[i] = filter[i] || other.filter[i];
110110
}
111+
all_match = all_match || other.all_match;
111112
}
112113

113-
void BitmapFilter::intersect(const BitmapFilter & other)
114+
void BitmapFilter::logicalAnd(const BitmapFilter & other)
114115
{
115116
RUNTIME_CHECK(filter.size() == other.filter.size());
116117
if (all_match)

dbms/src/Storages/DeltaMerge/BitmapFilter/BitmapFilter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ class BitmapFilter
4141
void rangeAnd(IColumn::Filter & f, UInt32 start, UInt32 limit) const;
4242

4343
// f = f | other
44-
void merge(const BitmapFilter & other);
44+
void logicalOr(const BitmapFilter & other);
4545
// f = f & other
46-
void intersect(const BitmapFilter & other);
46+
void logicalAnd(const BitmapFilter & other);
4747

4848
void runOptimize();
4949

dbms/src/Storages/DeltaMerge/Filter/ColumnRange.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ BitmapFilterPtr AndColumnRange::check(
9292
if (!result || !child_result)
9393
result = child_result;
9494
else
95-
result->intersect(*child_result);
95+
result->logicalAnd(*child_result);
9696
}
9797
return result;
9898
}
@@ -168,7 +168,7 @@ BitmapFilterPtr OrColumnRange::check(
168168
if (!result || !child_result)
169169
result = child_result;
170170
else
171-
result->merge(*child_result);
171+
result->logicalOr(*child_result);
172172
}
173173
return result;
174174
}

dbms/src/Storages/DeltaMerge/Filter/IntegerSet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ BitmapFilterPtr CompositeSet<T>::search(InvertedIndexReaderPtr inverted_index, s
574574
case SetType::Range:
575575
case SetType::Composite:
576576
auto sub_filter = set->search(inverted_index, size);
577-
filter->merge(*sub_filter);
577+
filter->logicalOr(*sub_filter);
578578
break;
579579
}
580580
}

0 commit comments

Comments
 (0)