quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nav...@apache.org
Subject [2/2] incubator-quickstep git commit: Use base table cardinality to set filter size.
Date Thu, 14 Jul 2016 15:39:18 GMT
Use base table cardinality to set filter size.


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

Branch: refs/heads/lookahead_exact
Commit: 1cabb63ea284001c9d0fb1e81203b7e8960f8907
Parents: df930e9
Author: Navneet Potti <navsan@gmail.com>
Authored: Thu Jul 14 10:20:00 2016 -0500
Committer: Navneet Potti <navsan@gmail.com>
Committed: Thu Jul 14 10:20:00 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/1cabb63e/query_optimizer/ExecutionHeuristics.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/ExecutionHeuristics.cpp b/query_optimizer/ExecutionHeuristics.cpp
index f7c54f6..5f05b31 100644
--- a/query_optimizer/ExecutionHeuristics.cpp
+++ b/query_optimizer/ExecutionHeuristics.cpp
@@ -109,7 +109,9 @@ void ExecutionHeuristics::optimizeExecutionPlan(QueryPlan *query_plan,
 
 void ExecutionHeuristics::setBloomFilterProperties(serialization::BloomFilter *bloom_filter_proto,
                                                    const std::size_t hash_join_index) {
-  auto cardinality = hash_joins_[hash_join_index].estimated_build_relation_cardinality_;
+  // auto cardinality = hash_joins_[hash_join_index].estimated_build_relation_cardinality_;
+  auto relation = hash_joins_[hash_join_index].referenced_stored_build_relation_;
+  const std::size_t cardinality = relation->getStatistics().getNumTuples();
   bloom_filter_proto->set_bloom_filter_size(
       BloomFilter::getNearestAllowedSize(cardinality/kNumBitsPerByte));
   bloom_filter_proto->set_number_of_hashes(1);


Mime
View raw message