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/f05036be Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/f05036be Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/f05036be Branch: refs/heads/partitioned-aggregation Commit: f05036bed3ef510d46f7c5b714f774e3710c4a12 Parents: bc524a9 Author: Harshad Deshmukh <hbdeshm...@apache.org> Authored: Fri Aug 19 15:00:28 2016 -0500 Committer: Harshad Deshmukh <hbdeshm...@apache.org> Committed: Tue Sep 20 12:57:06 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/f05036be/storage/AggregationOperationState.cpp ---------------------------------------------------------------------- diff --git a/storage/AggregationOperationState.cpp b/storage/AggregationOperationState.cpp index faf2c0b..66c4a83 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/f05036be/storage/AggregationOperationState.hpp ---------------------------------------------------------------------- diff --git a/storage/AggregationOperationState.hpp b/storage/AggregationOperationState.hpp index 880375f..ab82c2e 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_; }