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/16 18:29:51 UTC
[27/29] incubator-quickstep git commit: New operator to destroy
aggregation state.
New operator to destroy aggregation state.
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/5ea5526b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/5ea5526b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/5ea5526b
Branch: refs/heads/partitioned-aggregation
Commit: 5ea5526b548eaac88ff821e80fed85b00723169b
Parents: d870499
Author: Harshad Deshmukh <hb...@apache.org>
Authored: Sun Aug 21 09:32:51 2016 -0500
Committer: Harshad Deshmukh <hb...@apache.org>
Committed: Fri Sep 16 13:27:22 2016 -0500
----------------------------------------------------------------------
query_execution/QueryContext.hpp | 13 +++++++++++++
relational_operators/CMakeLists.txt | 11 +++++++++++
2 files changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/5ea5526b/query_execution/QueryContext.hpp
----------------------------------------------------------------------
diff --git a/query_execution/QueryContext.hpp b/query_execution/QueryContext.hpp
index 393b55e..f6c08ba 100644
--- a/query_execution/QueryContext.hpp
+++ b/query_execution/QueryContext.hpp
@@ -185,6 +185,19 @@ class QueryContext {
* @brief Destroy the given aggregation state.
*
* @param id The ID of the AggregationOperationState to destroy.
+ *
+ * @return The AggregationOperationState, alreadly created in the constructor.
+ **/
+ inline void destroyAggregationState(const aggregation_state_id id) {
+ DCHECK_LT(id, aggregation_states_.size());
+ DCHECK(aggregation_states_[id]);
+ aggregation_states_[id].reset(nullptr);
+ }
+
+ /**
+ * @brief Destroy the given aggregation state.
+ *
+ * @param id The ID of the AggregationOperationState to destroy.
**/
inline void destroyAggregationState(const aggregation_state_id id) {
DCHECK_LT(id, aggregation_states_.size());
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/5ea5526b/relational_operators/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/relational_operators/CMakeLists.txt b/relational_operators/CMakeLists.txt
index cdfe309..502ff64 100644
--- a/relational_operators/CMakeLists.txt
+++ b/relational_operators/CMakeLists.txt
@@ -37,6 +37,7 @@ add_library(quickstep_relationaloperators_DestroyAggregationStateOperator
DestroyAggregationStateOperator.cpp
DestroyAggregationStateOperator.hpp)
add_library(quickstep_relationaloperators_DeleteOperator DeleteOperator.cpp DeleteOperator.hpp)
+add_library(quickstep_relationaloperators_DestroyAggregationStateOperator DestroyAggregationStateOperator.cpp DestroyAggregationStateOperator.hpp)
add_library(quickstep_relationaloperators_DestroyHashOperator DestroyHashOperator.cpp DestroyHashOperator.hpp)
add_library(quickstep_relationaloperators_DropTableOperator DropTableOperator.cpp DropTableOperator.hpp)
add_library(quickstep_relationaloperators_FinalizeAggregationOperator
@@ -159,6 +160,16 @@ target_link_libraries(quickstep_relationaloperators_DestroyHashOperator
quickstep_relationaloperators_WorkOrder_proto
quickstep_utility_Macros
tmb)
+target_link_libraries(quickstep_relationaloperators_DestroyAggregationStateOperator
+ glog
+ quickstep_queryexecution_QueryContext
+ quickstep_queryexecution_WorkOrderProtosContainer
+ quickstep_queryexecution_WorkOrdersContainer
+ quickstep_relationaloperators_RelationalOperator
+ quickstep_relationaloperators_WorkOrder
+ quickstep_relationaloperators_WorkOrder_proto
+ quickstep_utility_Macros
+ tmb)
target_link_libraries(quickstep_relationaloperators_DropTableOperator
glog
quickstep_catalog_CatalogDatabase