Skip to content

Commit eb7d6be

Browse files
committed
address pr comments
1 parent 3f2ce60 commit eb7d6be

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

src/Storages/MergeTree/MergeTreeIndexBloomFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ bool MergeTreeIndexConditionBloomFilter::alwaysUnknownOrTrue() const
212212
{
213213
return rpnEvaluatesAlwaysUnknownOrTrue(
214214
rpn,
215-
[&](RPNElement::Function function)
215+
[](RPNElement::Function function)
216216
{
217217
return (
218218
function == RPNElement::FUNCTION_EQUALS || function == RPNElement::FUNCTION_NOT_EQUALS

src/Storages/MergeTree/MergeTreeIndexBloomFilterText.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ bool MergeTreeConditionBloomFilterText::alwaysUnknownOrTrue() const
178178
{
179179
return rpnEvaluatesAlwaysUnknownOrTrue(
180180
rpn,
181-
[&](RPNElement::Function function)
181+
[](RPNElement::Function function)
182182
{
183183
return (
184184
function == RPNElement::FUNCTION_EQUALS || function == RPNElement::FUNCTION_NOT_EQUALS

src/Storages/MergeTree/MergeTreeIndexGin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ bool MergeTreeIndexConditionGin::alwaysUnknownOrTrue() const
223223
{
224224
return rpnEvaluatesAlwaysUnknownOrTrue(
225225
rpn,
226-
[&](RPNElement::Function function)
226+
[](RPNElement::Function function)
227227
{
228228
return (
229229
function == RPNElement::FUNCTION_EQUALS || function == RPNElement::FUNCTION_NOT_EQUALS

src/Storages/MergeTree/MergeTreeIndexMinMax.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ bool MergeTreeIndexConditionMinMax::alwaysUnknownOrTrue() const
179179
{
180180
return rpnEvaluatesAlwaysUnknownOrTrue(
181181
condition.getRPN(),
182-
[&](KeyCondition::RPNElement::Function function)
182+
[](KeyCondition::RPNElement::Function function)
183183
{
184184
return (
185185
function == KeyCondition::RPNElement::FUNCTION_NOT_IN_RANGE || function == KeyCondition::RPNElement::FUNCTION_IN_RANGE

src/Storages/MergeTree/MergeTreeIndices.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ class IMergeTreeIndexCondition
188188
throw Exception(ErrorCodes::LOGICAL_ERROR, "calculateApproximateNearestNeighbors is not implemented for non-vector-similarity indexes");
189189
}
190190

191-
template <typename RPNElement, typename FUNC>
192-
bool rpnEvaluatesAlwaysUnknownOrTrue(const std::vector<RPNElement> & rpn, FUNC && isMatchingRPNFunction) const
191+
template <typename RPNElement>
192+
bool rpnEvaluatesAlwaysUnknownOrTrue(
193+
const std::vector<RPNElement> & rpn, std::function<bool(typename RPNElement::Function)> isMatchingRPNFunction) const
193194
{
194195
std::vector<Internal::RPNEvaluationIndexUsefulnessState> rpn_stack;
195196
rpn_stack.reserve(rpn.size() - 1);

0 commit comments

Comments
 (0)