quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbdeshm...@apache.org
Subject [5/6] incubator-quickstep git commit: Updates
Date Tue, 01 Nov 2016 21:57:02 GMT
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 <hbdeshmukh@apache.org>
Authored: Tue Nov 1 16:17:03 2016 -0500
Committer: Harshad Deshmukh <hbdeshmukh@apache.org>
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<std::unordered_map<attribute_id, std::unique_ptr<const Scalar>>>
update_groups_;
   std::vector<std::unique_ptr<WindowAggregationOperationState>> 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<dag_operator_id> 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 =


Mime
View raw message