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 1B221200C45 for ; Tue, 21 Feb 2017 04:37:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 19E2B160B7C; Tue, 21 Feb 2017 03:37:50 +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 689B9160B7B for ; Tue, 21 Feb 2017 04:37:49 +0100 (CET) Received: (qmail 2060 invoked by uid 500); 21 Feb 2017 03:37:48 -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 2033 invoked by uid 99); 21 Feb 2017 03:37:48 -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, 21 Feb 2017 03:37:48 +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 1181DC6DCC for ; Tue, 21 Feb 2017 03:37:48 +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 wze5XH7ua9N8 for ; Tue, 21 Feb 2017 03:37:47 +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 441665FCE8 for ; Tue, 21 Feb 2017 03:37:45 +0000 (UTC) Received: (qmail 1157 invoked by uid 99); 21 Feb 2017 03:37:44 -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, 21 Feb 2017 03:37:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5CD41E7EB0; Tue, 21 Feb 2017 03:37:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jianqiao@apache.org To: commits@quickstep.incubator.apache.org Date: Tue, 21 Feb 2017 03:37:57 -0000 Message-Id: In-Reply-To: <19599fc867b54dd59c5a2df165883a74@git.apache.org> References: <19599fc867b54dd59c5a2df165883a74@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [14/50] [abbrv] incubator-quickstep git commit: Fixed CopyFrom bug in the distributed version. archived-at: Tue, 21 Feb 2017 03:37:50 -0000 Fixed CopyFrom bug in the distributed version. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/61391caa Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/61391caa Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/61391caa Branch: refs/heads/LIP-time-decomposition Commit: 61391caac81201383fa7ea03b1321be50194b525 Parents: 929e5f1 Author: Zuyu Zhang Authored: Fri Feb 3 00:09:37 2017 -0800 Committer: Zuyu Zhang Committed: Fri Feb 3 00:09:37 2017 -0800 ---------------------------------------------------------------------- query_optimizer/ExecutionGenerator.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/61391caa/query_optimizer/ExecutionGenerator.cpp ---------------------------------------------------------------------- diff --git a/query_optimizer/ExecutionGenerator.cpp b/query_optimizer/ExecutionGenerator.cpp index b73de39..6918313 100644 --- a/query_optimizer/ExecutionGenerator.cpp +++ b/query_optimizer/ExecutionGenerator.cpp @@ -988,6 +988,11 @@ void ExecutionGenerator::convertCopyFrom( // CopyFrom is converted to a TextScan and a SaveBlocks. const CatalogRelation *output_relation = physical_plan->catalog_relation(); + const relation_id output_rel_id = output_relation->getID(); + +#ifdef QUICKSTEP_DISTRIBUTED + referenced_relation_ids_.insert(output_rel_id); +#endif // Create InsertDestination proto. const QueryContext::insert_destination_id insert_destination_index = @@ -995,7 +1000,7 @@ void ExecutionGenerator::convertCopyFrom( S::InsertDestination *insert_destination_proto = query_context_proto_->add_insert_destinations(); insert_destination_proto->set_insert_destination_type(S::InsertDestinationType::BLOCK_POOL); - insert_destination_proto->set_relation_id(output_relation->getID()); + insert_destination_proto->set_relation_id(output_rel_id); insert_destination_proto->mutable_layout()->MergeFrom( output_relation->getDefaultStorageBlockLayout().getDescription()); @@ -1016,7 +1021,7 @@ void ExecutionGenerator::convertCopyFrom( insert_destination_proto->set_relational_op_index(scan_operator_index); CatalogRelation *mutable_output_relation = - catalog_database_->getRelationByIdMutable(output_relation->getID()); + catalog_database_->getRelationByIdMutable(output_rel_id); const QueryPlan::DAGNodeIndex save_blocks_operator_index = execution_plan_->addRelationalOperator( new SaveBlocksOperator(query_handle_->query_id(), mutable_output_relation));