You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by hb...@apache.org on 2016/09/06 20:16:46 UTC

[69/73] [abbrv] incubator-quickstep git commit: Changed the bool flag

Changed the bool flag


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

Branch: refs/heads/partitioned-aggregation
Commit: 6ecda1f742f08b27de3bf1c1b9bd4c1a49b5e2d9
Parents: 4064d39
Author: Harshad Deshmukh <hb...@apache.org>
Authored: Fri Aug 19 15:00:28 2016 -0500
Committer: Harshad Deshmukh <hb...@apache.org>
Committed: Tue Sep 6 15:01:33 2016 -0500

----------------------------------------------------------------------
 storage/AggregationOperationState.cpp | 3 ++-
 storage/AggregationOperationState.hpp | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/6ecda1f7/storage/AggregationOperationState.cpp
----------------------------------------------------------------------
diff --git a/storage/AggregationOperationState.cpp b/storage/AggregationOperationState.cpp
index 6b4a672..20ba114 100644
--- a/storage/AggregationOperationState.cpp
+++ b/storage/AggregationOperationState.cpp
@@ -68,7 +68,7 @@ AggregationOperationState::AggregationOperationState(
     const HashTableImplType hash_table_impl_type,
     const std::vector<HashTableImplType> &distinctify_hash_table_impl_types,
     StorageManager *storage_manager)
-    : is_aggregate_partitioned_(estimated_num_entries > kPartitionedAggregateThreshold),
+    : is_aggregate_partitioned_(estimated_num_entries > kPartitionedAggregateThreshold && !group_by.empty()),
       input_relation_(input_relation),
       predicate_(predicate),
       group_by_list_(std::move(group_by)),
@@ -76,6 +76,7 @@ AggregationOperationState::AggregationOperationState(
       is_distinct_(std::move(is_distinct)),
       storage_manager_(storage_manager) {
   // Sanity checks: each aggregate has a corresponding list of arguments.
+  LOG(INFO) << "Aggregate partitioned: " << is_aggregate_partitioned_ << " with estimated # entries: " << estimated_num_entries;
   DCHECK(aggregate_functions.size() == arguments_.size());
 
   // Get the types of GROUP BY expressions for creating HashTables below.

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/6ecda1f7/storage/AggregationOperationState.hpp
----------------------------------------------------------------------
diff --git a/storage/AggregationOperationState.hpp b/storage/AggregationOperationState.hpp
index 37d77e3..7a11e92 100644
--- a/storage/AggregationOperationState.hpp
+++ b/storage/AggregationOperationState.hpp
@@ -181,6 +181,11 @@ class AggregationOperationState {
   void finalizeAggregatePartitioned(const std::size_t partition_id,
                                     InsertDestination *output_destination);
 
+  /**
+   * @brief Find if the aggregation has been performed in a partitoned way.
+   *
+   * @note At present the partitioning is enabled only with GROUP BY.
+   **/
   bool isAggregatePartitioned() const {
     return is_aggregate_partitioned_;
   }