Remove mutable from RPNElement.

This commit is contained in:
Nikolai Kochetov 2020-07-21 14:02:58 +03:00
parent d6583698a9
commit 12c5e376c6
2 changed files with 5 additions and 5 deletions

View File

@ -463,7 +463,7 @@ static Field applyFunctionForField(
return (*block.safeGetByPosition(1).column)[0]; return (*block.safeGetByPosition(1).column)[0];
} }
static FieldRef applyFunction(FunctionBasePtr & func, const DataTypePtr & current_type, const FieldRef & field) static FieldRef applyFunction(const FunctionBasePtr & func, const DataTypePtr & current_type, const FieldRef & field)
{ {
/// Fallback for fields without block reference. /// Fallback for fields without block reference.
if (field.isExplicit()) if (field.isExplicit())
@ -1098,10 +1098,10 @@ BoolMask KeyCondition::checkInRange(
std::optional<Range> KeyCondition::applyMonotonicFunctionsChainToRange( std::optional<Range> KeyCondition::applyMonotonicFunctionsChainToRange(
Range key_range, Range key_range,
MonotonicFunctionsChain & functions, const MonotonicFunctionsChain & functions,
DataTypePtr current_type) DataTypePtr current_type)
{ {
for (auto & func : functions) for (const auto & func : functions)
{ {
/// We check the monotonicity of each function on a specific range. /// We check the monotonicity of each function on a specific range.
IFunction::Monotonicity monotonicity = func->getMonotonicityForRange( IFunction::Monotonicity monotonicity = func->getMonotonicityForRange(

View File

@ -306,7 +306,7 @@ public:
static std::optional<Range> applyMonotonicFunctionsChainToRange( static std::optional<Range> applyMonotonicFunctionsChainToRange(
Range key_range, Range key_range,
MonotonicFunctionsChain & functions, const MonotonicFunctionsChain & functions,
DataTypePtr current_type); DataTypePtr current_type);
bool matchesExactContinuousRange() const; bool matchesExactContinuousRange() const;
@ -349,7 +349,7 @@ private:
using MergeTreeSetIndexPtr = std::shared_ptr<MergeTreeSetIndex>; using MergeTreeSetIndexPtr = std::shared_ptr<MergeTreeSetIndex>;
MergeTreeSetIndexPtr set_index; MergeTreeSetIndexPtr set_index;
mutable MonotonicFunctionsChain monotonic_functions_chain; /// The function execution does not violate the constancy. MonotonicFunctionsChain monotonic_functions_chain;
}; };
using RPN = std::vector<RPNElement>; using RPN = std::vector<RPNElement>;