mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Don't check monotonicity when analyze projections
This commit is contained in:
parent
9b0eb9cdd7
commit
696818b340
@ -8,7 +8,7 @@
|
||||
|
||||
namespace DB
|
||||
{
|
||||
MatchedTrees::Matches matchTrees(const ActionsDAG & inner_dag, const ActionsDAG & outer_dag)
|
||||
MatchedTrees::Matches matchTrees(const ActionsDAG & inner_dag, const ActionsDAG & outer_dag, bool check_monotonicity)
|
||||
{
|
||||
using Parents = std::set<const ActionsDAG::Node *>;
|
||||
std::unordered_map<const ActionsDAG::Node *, Parents> inner_parents;
|
||||
@ -182,7 +182,7 @@ MatchedTrees::Matches matchTrees(const ActionsDAG & inner_dag, const ActionsDAG
|
||||
}
|
||||
}
|
||||
|
||||
if (!match.node && frame.node->function_base->hasInformationAboutMonotonicity())
|
||||
if (!match.node && check_monotonicity && frame.node->function_base->hasInformationAboutMonotonicity())
|
||||
{
|
||||
size_t num_const_args = 0;
|
||||
const ActionsDAG::Node * monotonic_child = nullptr;
|
||||
|
@ -39,5 +39,5 @@ struct MatchedTrees
|
||||
using Matches = std::unordered_map<const ActionsDAG::Node *, Match>;
|
||||
};
|
||||
|
||||
MatchedTrees::Matches matchTrees(const ActionsDAG & inner_dag, const ActionsDAG & outer_dag);
|
||||
MatchedTrees::Matches matchTrees(const ActionsDAG & inner_dag, const ActionsDAG & outer_dag, bool check_monotonicity = true);
|
||||
}
|
||||
|
@ -287,7 +287,7 @@ ActionsDAGPtr analyzeAggregateProjection(
|
||||
{
|
||||
auto proj_index = buildDAGIndex(*info.before_aggregation);
|
||||
|
||||
MatchedTrees::Matches matches = matchTrees(*info.before_aggregation, *query.dag);
|
||||
MatchedTrees::Matches matches = matchTrees(*info.before_aggregation, *query.dag, false /* check_monotonicity */);
|
||||
|
||||
// for (const auto & [node, match] : matches)
|
||||
// {
|
||||
|
Loading…
Reference in New Issue
Block a user