From commits-return-3293-apmail-quickstep-commits-archive=quickstep.apache.org@quickstep.incubator.apache.org Tue Nov 1 21:57:02 2016 Return-Path: X-Original-To: apmail-quickstep-commits-archive@minotaur.apache.org Delivered-To: apmail-quickstep-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 059A61918F for ; Tue, 1 Nov 2016 21:57:02 +0000 (UTC) Received: (qmail 36577 invoked by uid 500); 1 Nov 2016 21:57:02 -0000 Delivered-To: apmail-quickstep-commits-archive@quickstep.apache.org Received: (qmail 36546 invoked by uid 500); 1 Nov 2016 21:57:01 -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 36533 invoked by uid 99); 1 Nov 2016 21:57:01 -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; Tue, 01 Nov 2016 21:57:01 +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 7AD61C0C04 for ; Tue, 1 Nov 2016 21:57:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 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=-2.999] 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 vVnzg2P_rby8 for ; Tue, 1 Nov 2016 21:57:00 +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 592AC5FC84 for ; Tue, 1 Nov 2016 21:56:59 +0000 (UTC) Received: (qmail 36458 invoked by uid 99); 1 Nov 2016 21:56:58 -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; Tue, 01 Nov 2016 21:56:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 61008E93E5; Tue, 1 Nov 2016 21:56:58 +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 Date: Tue, 01 Nov 2016 21:57:02 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [5/6] incubator-quickstep git commit: Updates Updates Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/584461ab Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/584461ab Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/584461ab Branch: refs/heads/delay-hashtable-memory-alloc Commit: 584461ab9539a13c316f928419842b2e60660b34 Parents: f54d1a2 Author: Harshad Deshmukh Authored: Tue Nov 1 16:17:03 2016 -0500 Committer: Harshad Deshmukh Committed: Tue Nov 1 16:56:38 2016 -0500 ---------------------------------------------------------------------- query_execution/QueryContext.hpp | 9 +++++++++ query_execution/QueryContext.proto | 2 ++ query_optimizer/ExecutionGenerator.cpp | 3 +++ 3 files changed, 14 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/584461ab/query_execution/QueryContext.hpp ---------------------------------------------------------------------- diff --git a/query_execution/QueryContext.hpp b/query_execution/QueryContext.hpp index 7ad8fa1..820cbb6 100644 --- a/query_execution/QueryContext.hpp +++ b/query_execution/QueryContext.hpp @@ -133,6 +133,11 @@ class QueryContext { typedef std::uint32_t window_aggregation_state_id; /** + * @brief A unique identifier of a relational operator in the DAG. + **/ + typedef std::uint32_t dag_operator_id; + + /** * @brief Constructor. * * @param proto A serialized Protocol Buffer representation of a @@ -575,6 +580,10 @@ class QueryContext { std::vector>> update_groups_; std::vector> window_aggregation_states_; + // The IDs of the BuildHashOperator nodes in the query plan DAG. + // This vector has a 1-1 correspondence with join_hash_tables_ vector. + std::vector build_hash_operator_ids_; + DISALLOW_COPY_AND_ASSIGN(QueryContext); }; http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/584461ab/query_execution/QueryContext.proto ---------------------------------------------------------------------- diff --git a/query_execution/QueryContext.proto b/query_execution/QueryContext.proto index ab0f520..f8831db 100644 --- a/query_execution/QueryContext.proto +++ b/query_execution/QueryContext.proto @@ -62,4 +62,6 @@ message QueryContext { repeated WindowAggregationOperationState window_aggregation_states = 12; required uint64 query_id = 13; + + repeated uint32 build_hash_operator_ids = 14; } http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/584461ab/query_optimizer/ExecutionGenerator.cpp ---------------------------------------------------------------------- diff --git a/query_optimizer/ExecutionGenerator.cpp b/query_optimizer/ExecutionGenerator.cpp index 2e0d8f3..545f539 100644 --- a/query_optimizer/ExecutionGenerator.cpp +++ b/query_optimizer/ExecutionGenerator.cpp @@ -729,6 +729,9 @@ void ExecutionGenerator::convertHashJoin(const P::HashJoinPtr &physical_plan) { any_build_attributes_nullable, join_hash_table_index)); + // Add the index of build operator to QueryContext. + query_context_proto_->add_build_hash_operator_ids(build_operator_index); + // Create InsertDestination proto. const CatalogRelation *output_relation = nullptr; const QueryContext::insert_destination_id insert_destination_index =