mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Fix limit push down.
This commit is contained in:
parent
7e75965af8
commit
443a3e7e6f
@ -40,7 +40,7 @@ size_t tryMergeExpressions(QueryPlan::Node * parent_node, QueryPlan::Nodes &);
|
||||
|
||||
/// Move FilterStep down if possible.
|
||||
/// May split FilterStep and push down only part of it.
|
||||
size_t tryPushDownLimit(QueryPlan::Node * parent_node, QueryPlan::Nodes & nodes);
|
||||
size_t tryPushDownFilter(QueryPlan::Node * parent_node, QueryPlan::Nodes & nodes);
|
||||
|
||||
inline const auto & getOptimizations()
|
||||
{
|
||||
@ -50,7 +50,7 @@ inline const auto & getOptimizations()
|
||||
{tryPushDownLimit, "pushDownLimit"},
|
||||
{trySplitFilter, "splitFilter"},
|
||||
{tryMergeExpressions, "mergeExpressions"},
|
||||
{tryPushDownLimit, "pushDownFilter"},
|
||||
{tryPushDownFilter, "pushDownFilter"},
|
||||
}};
|
||||
|
||||
return optimizations;
|
||||
|
@ -42,11 +42,11 @@ size_t tryPushDownLimit(QueryPlan::Node * parent_node, QueryPlan::Nodes & nodes)
|
||||
for (auto pos : params.keys)
|
||||
keys.push_back(params.src_header.getByPosition(pos).name);
|
||||
|
||||
// std::cerr << "Filter: \n" << expression->dumpDAG() << std::endl;
|
||||
std::cerr << "Filter: \n" << expression->dumpDAG() << std::endl;
|
||||
if (auto split_filter = expression->splitActionsForFilter(filter_column_name, removes_filter, keys))
|
||||
{
|
||||
// std::cerr << "===============\n" << expression->dumpDAG() << std::endl;
|
||||
// std::cerr << "---------------\n" << split_filter->dumpDAG() << std::endl;
|
||||
std::cerr << "===============\n" << expression->dumpDAG() << std::endl;
|
||||
std::cerr << "---------------\n" << split_filter->dumpDAG() << std::endl;
|
||||
|
||||
auto it = expression->getIndex().find(filter_column_name);
|
||||
if (it == expression->getIndex().end())
|
||||
|
Loading…
Reference in New Issue
Block a user