Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3F280200B52 for ; Mon, 25 Jul 2016 19:24:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3DE0B160A7D; Mon, 25 Jul 2016 17:24:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 85886160A67 for ; Mon, 25 Jul 2016 19:24:40 +0200 (CEST) Received: (qmail 30369 invoked by uid 500); 25 Jul 2016 17:24:39 -0000 Mailing-List: contact commits-help@quickstep.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quickstep.incubator.apache.org Delivered-To: mailing list commits@quickstep.incubator.apache.org Received: (qmail 30360 invoked by uid 99); 25 Jul 2016 17:24:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2016 17:24:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 30D93C0373 for ; Mon, 25 Jul 2016 17:24:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id YaB3Yx_Dds_G for ; Mon, 25 Jul 2016 17:24:38 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 60D955F341 for ; Mon, 25 Jul 2016 17:24:37 +0000 (UTC) Received: (qmail 30341 invoked by uid 99); 25 Jul 2016 17:24:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2016 17:24:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6FE64E00A7; Mon, 25 Jul 2016 17:24:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hbdeshmukh@apache.org To: commits@quickstep.incubator.apache.org Message-Id: <124dff1548214a8ab8c80525688018eb@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-quickstep git commit: Minor bug fix in QueryManager base. Date: Mon, 25 Jul 2016 17:24:36 +0000 (UTC) archived-at: Mon, 25 Jul 2016 17:24:41 -0000 Repository: incubator-quickstep Updated Branches: refs/heads/query-status-return-bugfix [created] 7d44e63bf Minor bug fix in QueryManager base. - Modified the order in which we check the completion of query and completion of an operator in the queryStatus function. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/7d44e63b Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/7d44e63b Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/7d44e63b Branch: refs/heads/query-status-return-bugfix Commit: 7d44e63bfc1dc51255bafbc9b3ffea386d5b229b Parents: 2b78380 Author: Harshad Deshmukh Authored: Mon Jul 25 12:23:34 2016 -0500 Committer: Harshad Deshmukh Committed: Mon Jul 25 12:23:34 2016 -0500 ---------------------------------------------------------------------- query_execution/QueryManagerBase.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/7d44e63b/query_execution/QueryManagerBase.cpp ---------------------------------------------------------------------- diff --git a/query_execution/QueryManagerBase.cpp b/query_execution/QueryManagerBase.cpp index 37beb02..d2a3341 100644 --- a/query_execution/QueryManagerBase.cpp +++ b/query_execution/QueryManagerBase.cpp @@ -71,15 +71,16 @@ QueryManagerBase::QueryManagerBase(QueryHandle *query_handle) QueryManagerBase::QueryStatusCode QueryManagerBase::queryStatus( const dag_node_index op_index) { - if (query_exec_state_->hasExecutionFinished(op_index)) { - return QueryStatusCode::kOperatorExecuted; - } - - // As kQueryExecuted takes precedence over kOperatorExecuted, we check again. + // As kQueryExecuted takes precedence over kOperatorExecuted, we first check + // whether the query has finished its execution. if (query_exec_state_->hasQueryExecutionFinished()) { return QueryStatusCode::kQueryExecuted; } + if (query_exec_state_->hasExecutionFinished(op_index)) { + return QueryStatusCode::kOperatorExecuted; + } + return QueryStatusCode::kNone; }