You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by ha...@apache.org on 2017/05/02 05:13:22 UTC

[10/11] incubator-quickstep git commit: New addition.

New addition.


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/1d94edf2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/1d94edf2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/1d94edf2

Branch: refs/heads/frontend-backend
Commit: 1d94edf2080f9cbf9d55f261017d0ce10c273ad5
Parents: 364eb40
Author: Hakan Memisoglu <ha...@apache.org>
Authored: Mon Apr 24 11:57:24 2017 -0500
Committer: Hakan Memisoglu <ha...@apache.org>
Committed: Tue May 2 00:12:54 2017 -0500

----------------------------------------------------------------------
 query_execution/ExecutionDeserializer.cpp | 6 ++++++
 query_execution/ExecutionDeserializer.hpp | 3 +++
 query_optimizer/Optimizer.cpp             | 4 ++--
 3 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/1d94edf2/query_execution/ExecutionDeserializer.cpp
----------------------------------------------------------------------
diff --git a/query_execution/ExecutionDeserializer.cpp b/query_execution/ExecutionDeserializer.cpp
index ddfc2f2..d1e96fa 100644
--- a/query_execution/ExecutionDeserializer.cpp
+++ b/query_execution/ExecutionDeserializer.cpp
@@ -83,7 +83,13 @@ void ExecutionDeserializer::deserializeInternal(const S::Vertex &vertex) {
 }
 
 void ExecutionDeserializer::deserializeAggregation(const S::AggregationOperator &aggregation_operator) {
+  const std::size_t query_id = 1;
+  const relation_id relation = aggregation_operator.relation_id();
+  const bool is_relation_stored = aggregation_operator.relation_is_stored();
+  QueryContext::aggregation_state_id aggregation_state_index = aggregation_operator.aggr_state_index();
 
+  std::unique_ptr<AggregationOperator> aggregation = std::make_unique(new AggregationOperator())
+  query_plan.addRelationalOperator();
 }
 
 void ExecutionDeserializer::deserializeBuildAggregationExistenceMap(const S::BuildAggregationExistenceMapOperator &op) {

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/1d94edf2/query_execution/ExecutionDeserializer.hpp
----------------------------------------------------------------------
diff --git a/query_execution/ExecutionDeserializer.hpp b/query_execution/ExecutionDeserializer.hpp
index 36d5588..2ba4efc 100644
--- a/query_execution/ExecutionDeserializer.hpp
+++ b/query_execution/ExecutionDeserializer.hpp
@@ -20,6 +20,7 @@
 #ifndef QUICKSTEP_QUERY_EXECUTION_EXECUTION_DESERIALIZER_HPP
 #define QUICKSTEP_QUERY_EXECUTION_EXECUTION_DESERIALIZER_HPP
 
+#include "query_optimizer/QueryPlan.hpp"
 #include "relational_operators/AggregationOperator.hpp"
 #include "relational_operators/BuildAggregationExistenceMapOperator.hpp"
 #include "relational_operators/BuildHashOperator.hpp"
@@ -90,6 +91,8 @@ class ExecutionDeserializer {
   void deserializeWindowAggregation(const S::WindowAggregationOperator &window_aggregation_operator);
 
   const S::QueryPlan &query_plan_proto_;
+  
+  QueryPlan query_plan;
 };
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/1d94edf2/query_optimizer/Optimizer.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/Optimizer.cpp b/query_optimizer/Optimizer.cpp
index cb9cb24..d1119bf 100644
--- a/query_optimizer/Optimizer.cpp
+++ b/query_optimizer/Optimizer.cpp
@@ -36,11 +36,11 @@ void Optimizer::generateQueryHandle(const ParseStatement &parse_statement,
   ExecutionGenerator execution_generator(catalog_database, query_handle);
   ExecutionSerializer execution_serializer;
 
-  execution_generator.generatePlan(
+  const auto &query_plan = execution_generator.generatePlan(
       physical_generator.generatePlan(
           logical_generator.generatePlan(*catalog_database, parse_statement)));
 
-  execution_serializer.serializePlan(execution_generator);
+  execution_serializer.serializePlan(query_plan);
 }
 
 }  // namespace optimizer