You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by ji...@apache.org on 2017/04/20 03:41:22 UTC
[2/5] incubator-quickstep git commit: API to get total pending work
orders for an operator
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 <hb...@apache.org>
Authored: Wed Apr 19 13:31:08 2017 -0500
Committer: Harshad Deshmukh <hb...@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.