quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianq...@apache.org
Subject [6/6] incubator-quickstep git commit: Temporary adjustment for shortest path that prefer partitioned aggregation
Date Mon, 18 Sep 2017 19:33:10 GMT
Temporary adjustment for shortest path that prefer partitioned aggregation


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

Branch: refs/heads/trace
Commit: e6c99562bfd6b64adf15569acb9cd1d7874c79e4
Parents: 01dc532
Author: jianqiao <jianqiao@node-2.jianqiao.quickstep-pg0.wisc.cloudlab.us>
Authored: Mon Sep 18 14:27:28 2017 -0500
Committer: jianqiao <jianqiao@node-2.jianqiao.quickstep-pg0.wisc.cloudlab.us>
Committed: Mon Sep 18 14:32:45 2017 -0500

----------------------------------------------------------------------
 query_optimizer/ExecutionGenerator.cpp                   | 6 +-----
 query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp | 2 +-
 types/containers/ColumnVectorsValueAccessor.hpp          | 3 +--
 3 files changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/e6c99562/query_optimizer/ExecutionGenerator.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/ExecutionGenerator.cpp b/query_optimizer/ExecutionGenerator.cpp
index e7ef82a..6f362b8 100644
--- a/query_optimizer/ExecutionGenerator.cpp
+++ b/query_optimizer/ExecutionGenerator.cpp
@@ -189,7 +189,7 @@ static const volatile bool num_aggregation_partitions_dummy
     = gflags::RegisterFlagValidator(&FLAGS_num_aggregation_partitions, &ValidateNumAggregationPartitions);
 
 DEFINE_uint64(partition_aggregation_num_groups_threshold,
-              100000,
+              100,
               "The threshold used for deciding whether the aggregation is done "
               "in a partitioned way or not");
 
@@ -267,10 +267,6 @@ bool CheckAggregatePartitioned(const std::size_t num_aggregate_functions,
                                const std::vector<bool> &is_distincts,
                                const std::vector<attribute_id> &group_by_attrs,
                                const std::size_t estimated_num_groups) {
-  // If there's no aggregation, return false.
-  if (num_aggregate_functions == 0) {
-    return false;
-  }
   // If there is only only aggregate function, we allow distinct aggregation.
   // Otherwise it can't be partitioned with distinct aggregation.
   if (num_aggregate_functions > 1) {

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/e6c99562/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp b/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp
index e0e3dff..ebc4d78 100644
--- a/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp
+++ b/query_optimizer/cost_model/StarSchemaSimpleCostModel.cpp
@@ -711,7 +711,7 @@ bool StarSchemaSimpleCostModel::canUseTwoPhaseCompactKeyAggregation(
   // to put that flag so that it can be shared by the two cpp files (optimizer
   // vs backend). So here we hardcode the threshold and leave it to be solved
   // later.
-  if (estimated_num_groups >= 10000u) {
+  if (estimated_num_groups >= 100u) {
     return false;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/e6c99562/types/containers/ColumnVectorsValueAccessor.hpp
----------------------------------------------------------------------
diff --git a/types/containers/ColumnVectorsValueAccessor.hpp b/types/containers/ColumnVectorsValueAccessor.hpp
index ebd46d4..08b1feb 100644
--- a/types/containers/ColumnVectorsValueAccessor.hpp
+++ b/types/containers/ColumnVectorsValueAccessor.hpp
@@ -164,8 +164,7 @@ class ColumnVectorsValueAccessor : public ValueAccessor {
     DCHECK(tupleIdInRange(tid));
     if (column_native_[attr_id]) {
       return static_cast<const NativeColumnVector&>(*columns_[attr_id])
-          .getTypedValue(tid)
-          .makeReferenceToThis();
+          .getTypedValue(tid);
     } else {
       return static_cast<const IndirectColumnVector&>(*columns_[attr_id])
           .getTypedValue(tid)


Mime
View raw message