quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianq...@apache.org
Subject incubator-quickstep git commit: updates
Date Tue, 04 Oct 2016 22:04:18 GMT
Repository: incubator-quickstep
Updated Branches:
  refs/heads/estimate-num-distinct-values 7196bf187 -> 4625c135f


updates


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/4625c135
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/4625c135
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/4625c135

Branch: refs/heads/estimate-num-distinct-values
Commit: 4625c135f4c805dbeeeff7ad947b759202216746
Parents: 7196bf1
Author: Jianqiao Zhu <jianqiao@cs.wisc.edu>
Authored: Tue Oct 4 17:03:58 2016 -0500
Committer: Jianqiao Zhu <jianqiao@cs.wisc.edu>
Committed: Tue Oct 4 17:03:58 2016 -0500

----------------------------------------------------------------------
 query_optimizer/ExecutionGenerator.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/4625c135/query_optimizer/ExecutionGenerator.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/ExecutionGenerator.cpp b/query_optimizer/ExecutionGenerator.cpp
index fb44e83..9347c9c 100644
--- a/query_optimizer/ExecutionGenerator.cpp
+++ b/query_optimizer/ExecutionGenerator.cpp
@@ -1411,7 +1411,9 @@ void ExecutionGenerator::convertAggregate(
     aggr_state_proto->mutable_predicate()->CopyFrom(predicate->getProto());
   }
 
-  aggr_state_proto->set_estimated_num_entries(cost_model_->estimateCardinality(physical_plan));
+  const std::size_t estimated_num_groups =
+      cost_model_->estimateNumGroupsForAggregate(physical_plan);
+  aggr_state_proto->set_estimated_num_entries(std::max(16uL, estimated_num_groups));
 
   const QueryPlan::DAGNodeIndex aggregation_operator_index =
       execution_plan_->addRelationalOperator(


Mime
View raw message