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/d870499c Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/d870499c Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/d870499c Branch: refs/heads/partitioned-aggregation Commit: d870499c3d5bcfa0fbebffdbf268052311bd9e0f Parents: ad8e6cf Author: Harshad Deshmukh <hbdeshm...@apache.org> Authored: Fri Aug 19 15:00:28 2016 -0500 Committer: Harshad Deshmukh <hbdeshm...@apache.org> Committed: Fri Sep 16 13:24:53 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/d870499c/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/d870499c/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_; }