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/08/19 20:00:52 UTC
incubator-quickstep git commit: Changed the bool flag
Repository: incubator-quickstep
Updated Branches:
refs/heads/partitioned-aggregation 31557e7e2 -> f85b959ac
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/f85b959a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/f85b959a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/f85b959a
Branch: refs/heads/partitioned-aggregation
Commit: f85b959aca0fd973375bffea8b00bceb7be4b6cb
Parents: 31557e7
Author: Harshad Deshmukh <hb...@apache.org>
Authored: Fri Aug 19 15:00:28 2016 -0500
Committer: Harshad Deshmukh <hb...@apache.org>
Committed: Fri Aug 19 15:00:28 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/f85b959a/storage/AggregationOperationState.cpp
----------------------------------------------------------------------
diff --git a/storage/AggregationOperationState.cpp b/storage/AggregationOperationState.cpp
index 4786531..38c9f9d 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/f85b959a/storage/AggregationOperationState.hpp
----------------------------------------------------------------------
diff --git a/storage/AggregationOperationState.hpp b/storage/AggregationOperationState.hpp
index aa1bc83..7ab06a0 100644
--- a/storage/AggregationOperationState.hpp
+++ b/storage/AggregationOperationState.hpp
@@ -179,6 +179,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_;
}