quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbdeshm...@apache.org
Subject [23/28] incubator-quickstep git commit: New operator to destroy aggregation state.
Date Tue, 20 Sep 2016 17:58:06 GMT
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/1db46d60
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/1db46d60
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/1db46d60

Branch: refs/heads/partitioned-aggregation
Commit: 1db46d605e6256d82eaab6cd11918b3b0b589e5b
Parents: f05036b
Author: Harshad Deshmukh <hbdeshmukh@apache.org>
Authored: Sun Aug 21 09:32:51 2016 -0500
Committer: Harshad Deshmukh <hbdeshmukh@apache.org>
Committed: Tue Sep 20 12:57:06 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/1db46d60/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/1db46d60/relational_operators/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/relational_operators/CMakeLists.txt b/relational_operators/CMakeLists.txt
index a9645b4..2632995 100644
--- a/relational_operators/CMakeLists.txt
+++ b/relational_operators/CMakeLists.txt
@@ -44,6 +44,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
@@ -166,6 +167,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


Mime
View raw message