quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianq...@apache.org
Subject [2/5] incubator-quickstep git commit: API to get total pending work orders for an operator
Date Thu, 20 Apr 2017 03:41:22 GMT
API to get total pending work orders for an operator

- Total includes normal and rebuild work orders.


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/3c83c937
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/3c83c937
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/3c83c937

Branch: refs/heads/improve-tpch-q01
Commit: 3c83c937acd6d2484cfa7c96c21e695fd3cdaba3
Parents: 6e3499a
Author: Harshad Deshmukh <hbdeshmukh@apache.org>
Authored: Wed Apr 19 13:31:08 2017 -0500
Committer: Harshad Deshmukh <hbdeshmukh@apache.org>
Committed: Wed Apr 19 14:38:24 2017 -0500

----------------------------------------------------------------------
 query_execution/WorkOrdersContainer.hpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3c83c937/query_execution/WorkOrdersContainer.hpp
----------------------------------------------------------------------
diff --git a/query_execution/WorkOrdersContainer.hpp b/query_execution/WorkOrdersContainer.hpp
index c1739bc..1fb3ca6 100644
--- a/query_execution/WorkOrdersContainer.hpp
+++ b/query_execution/WorkOrdersContainer.hpp
@@ -311,6 +311,19 @@ class WorkOrdersContainer {
     return rebuild_workorders_[operator_index].getNumWorkOrders();
   }
 
+  /**
+   * @brief Get the total number of work orders for the given operator.
+   *
+   * @param operator_index The index of the operator.
+   *
+   * @return The total number of WorkOrders (normal + rebuild).
+   **/
+  inline std::size_t getNumTotalWorkOrders(
+      const std::size_t operator_index) const {
+    return getNumNormalWorkOrders(operator_index) +
+           getNumRebuildWorkOrders(operator_index);
+  }
+
  private:
   /**
    * @brief An internal queue-based container structure to hold the WorkOrders.


Mime
View raw message