quickstep-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbdeshmukh <...@git.apache.org>
Subject [GitHub] incubator-quickstep pull request #54: Introduced QueryManagerBase, and renam...
Date Tue, 12 Jul 2016 19:01:05 GMT
Github user hbdeshmukh commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/54#discussion_r70500899
  
    --- Diff: query_execution/QueryManagerBase.hpp ---
    @@ -255,69 +212,75 @@ class QueryManager {
        *         otherwise.
        **/
       inline bool checkOperatorExecutionOver(const dag_node_index index) const {
    -    if (checkRebuildRequired(index)) {
    -      return (checkNormalExecutionOver(index) && checkRebuildOver(index));
    -    } else {
    -      return checkNormalExecutionOver(index);
    -    }
    +    return this->checkNormalExecutionOver(index) &&
    +           (!checkRebuildRequired(index) || this->checkRebuildOver(index));
       }
     
       /**
    -   * @brief Check if the given operator's normal execution is over.
    -   *
    -   * @note The conditions for a given operator's normal execution to get over:
    -   *       1. All of its  normal (i.e. non rebuild) WorkOrders have finished
    -   *       execution.
    -   *       2. The operator is done generating work orders.
    -   *       3. All of the dependencies of the given operator have been met.
    +   * @brief Check if the rebuild operation is required for a given operator.
        *
        * @param index The index of the given operator in the DAG.
        *
    -   * @return True if the normal execution of the given operator is over, false
    -   *         otherwise.
    +   * @return True if the rebuild operation is required, false otherwise.
        **/
    -  inline bool checkNormalExecutionOver(const dag_node_index index) const {
    -    return (checkAllDependenciesMet(index) &&
    -            !workorders_container_->hasNormalWorkOrder(index) &&
    -            query_exec_state_->getNumQueuedWorkOrders(index) == 0 &&
    -            query_exec_state_->hasDoneGenerationWorkOrders(index));
    +  inline bool checkRebuildRequired(const dag_node_index index) const {
    +    return query_exec_state_->isRebuildRequired(index);
       }
     
       /**
    -   * @brief Check if the rebuild operation is required for a given operator.
    +   * @brief Check if the rebuild operation for a given operator has been
    +   *        initiated.
        *
        * @param index The index of the given operator in the DAG.
        *
    -   * @return True if the rebuild operation is required, false otherwise.
    +   * @return True if the rebuild operation has been initiated, false otherwise.
        **/
    -  inline bool checkRebuildRequired(const dag_node_index index) const {
    -    return query_exec_state_->isRebuildRequired(index);
    +  inline bool checkRebuildInitiated(const dag_node_index index) const {
    +    return query_exec_state_->hasRebuildInitiated(index);
       }
     
    +  const std::size_t query_id_;
    +
    +  CatalogDatabaseLite *catalog_database_;
    +
    +  DAG<RelationalOperator, bool> *query_dag_;
    +  const dag_node_index num_operators_in_dag_;
    +
    +  // For all nodes, store their receiving dependents.
    +  std::vector<std::vector<dag_node_index>> output_consumers_;
    +
    +  // For all nodes, store their pipeline breaking dependencies (if any).
    +  std::vector<std::vector<dag_node_index>> blocking_dependencies_;
    +
    +  std::unique_ptr<QueryExecutionState> query_exec_state_;
    +
    + private:
       /**
    -   * @brief Check if the rebuild operation for a given operator is over.
    +   * @brief Fetch all work orders currently available in relational operator and
    +   *        store them internally.
        *
    -   * @param index The index of the given operator in the DAG.
    +   * @param index The index of the relational operator to be processed in the
    +   *        query plan DAG.
        *
    -   * @return True if the rebuild operation is over, false otherwise.
    +   * @return Whether any work order was generated by op.
    --- End diff --
    
    Better to say ``True if at least one work order was generate by the operator, false otherwise``.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message