quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianq...@apache.org
Subject [14/50] [abbrv] incubator-quickstep git commit: Fixed CopyFrom bug in the distributed version.
Date Tue, 21 Feb 2017 03:37:57 GMT
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 <zuyuz@apache.org>
Authored: Fri Feb 3 00:09:37 2017 -0800
Committer: Zuyu Zhang <zuyuz@apache.org>
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));


Mime
View raw message