incubator-quickstep git commit: Deserialization switch logic is implemented. [Forced Update!]

2017-04-23 Thread hakanmemisoglu
Repository: incubator-quickstep
Updated Branches:
  refs/heads/frontend-backend 0221d1358 -> 46e411354 (forced update)


Deserialization switch logic is implemented.


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

Branch: refs/heads/frontend-backend
Commit: 46e4113545548e0b40d8773e3949083f3eea1119
Parents: 9690858
Author: Hakan Memisoglu 
Authored: Sun Apr 23 17:38:42 2017 -0500
Committer: Hakan Memisoglu 
Committed: Sun Apr 23 18:53:51 2017 -0500

--
 query_execution/CMakeLists.txt|   2 +
 query_execution/ExecutionDeserializer.cpp | 182 +
 query_execution/ExecutionDeserializer.hpp |  98 +
 query_optimizer/ExecutionSerializer.cpp   |  80 +++
 query_optimizer/Optimizer.cpp |   9 +-
 utility/DAG.hpp   |   4 +-
 6 files changed, 341 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/46e41135/query_execution/CMakeLists.txt
--
diff --git a/query_execution/CMakeLists.txt b/query_execution/CMakeLists.txt
index eeed791..e4440fc 100644
--- a/query_execution/CMakeLists.txt
+++ b/query_execution/CMakeLists.txt
@@ -29,6 +29,7 @@ if (ENABLE_DISTRIBUTED)
   add_library(quickstep_queryexecution_BlockLocator BlockLocator.cpp 
BlockLocator.hpp)
   add_library(quickstep_queryexecution_BlockLocatorUtil BlockLocatorUtil.cpp 
BlockLocatorUtil.hpp)
 endif(ENABLE_DISTRIBUTED)
+add_library(quickstep_queryexecution_ExecutionDeserializer 
ExecutionDeserializer.cpp ExecutionDeserializer.hpp)
 add_library(quickstep_queryexecution_ForemanBase ../empty_src.cpp 
ForemanBase.hpp)
 if (ENABLE_DISTRIBUTED)
   add_library(quickstep_queryexecution_ForemanDistributed 
ForemanDistributed.cpp ForemanDistributed.hpp)
@@ -357,6 +358,7 @@ 
target_link_libraries(quickstep_queryexecution_WorkerSelectionPolicy
 add_library(quickstep_queryexecution ../empty_src.cpp QueryExecutionModule.hpp)
 target_link_libraries(quickstep_queryexecution
   quickstep_queryexecution_AdmitRequestMessage
+  quickstep_queryexecution_ExecutionDeserializer
   quickstep_queryexecution_ForemanBase
   quickstep_queryexecution_ForemanSingleNode
   quickstep_queryexecution_PolicyEnforcerBase

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/46e41135/query_execution/ExecutionDeserializer.cpp
--
diff --git a/query_execution/ExecutionDeserializer.cpp 
b/query_execution/ExecutionDeserializer.cpp
new file mode 100644
index 000..ddfc2f2
--- /dev/null
+++ b/query_execution/ExecutionDeserializer.cpp
@@ -0,0 +1,182 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ **/
+
+#include "query_execution/ExecutionDeserializer.hpp"
+
+namespace quickstep {
+namespace optimizer {
+
+void ExecutionDeserializer::deserializePlan() {
+  const auto &vertices = query_plan_proto_.vertex();
+  for (const auto &vertex : vertices) {
+deserializeInternal(vertex);
+  }
+}
+
+void ExecutionDeserializer::deserializeInternal(const S::Vertex &vertex) {
+  switch (vertex.operator_type()) {
+  case serialization::OP_AGGREGATION:
+return deserializeAggregation(vertex.aggregation_operator());
+  case serialization::OP_BUILD_AGGREGATION_EXISTENCE_MAP:
+return 
deserializeBuildAggregationExistenceMap(vertex.build_aggregation_existence_map_operator());
+  case serialization::OP_BUILD_HASH:
+return deserializeBuildHash(vertex.build_hash_operator());
+  case serialization::OP_BUILD_LIP_FILTER:
+return deserializeBuildLIPFilter(vertex.build_lip_filter_operator());
+  case serialization::OP_CREATE_INDEX:
+return deserializeCreateIndex(vertex.create_ind

incubator-quickstep git commit: Deserialization switch logic is implemented.

2017-04-23 Thread hakanmemisoglu
Repository: incubator-quickstep
Updated Branches:
  refs/heads/frontend-backend 96908588b -> 0221d1358


Deserialization switch logic is implemented.


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

Branch: refs/heads/frontend-backend
Commit: 0221d13584ec75e9f51c8527804cd1e761249ef8
Parents: 9690858
Author: Hakan Memisoglu 
Authored: Sun Apr 23 17:38:42 2017 -0500
Committer: Hakan Memisoglu 
Committed: Sun Apr 23 17:38:42 2017 -0500

--
 query_execution/CMakeLists.txt|   2 +
 query_execution/ExecutionDeserializer.cpp | 112 +
 query_execution/ExecutionDeserializer.hpp |  98 ++
 query_optimizer/ExecutionSerializer.cpp   |  80 --
 query_optimizer/Optimizer.cpp |   9 +-
 utility/DAG.hpp   |   4 +-
 6 files changed, 271 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/0221d135/query_execution/CMakeLists.txt
--
diff --git a/query_execution/CMakeLists.txt b/query_execution/CMakeLists.txt
index eeed791..e4440fc 100644
--- a/query_execution/CMakeLists.txt
+++ b/query_execution/CMakeLists.txt
@@ -29,6 +29,7 @@ if (ENABLE_DISTRIBUTED)
   add_library(quickstep_queryexecution_BlockLocator BlockLocator.cpp 
BlockLocator.hpp)
   add_library(quickstep_queryexecution_BlockLocatorUtil BlockLocatorUtil.cpp 
BlockLocatorUtil.hpp)
 endif(ENABLE_DISTRIBUTED)
+add_library(quickstep_queryexecution_ExecutionDeserializer 
ExecutionDeserializer.cpp ExecutionDeserializer.hpp)
 add_library(quickstep_queryexecution_ForemanBase ../empty_src.cpp 
ForemanBase.hpp)
 if (ENABLE_DISTRIBUTED)
   add_library(quickstep_queryexecution_ForemanDistributed 
ForemanDistributed.cpp ForemanDistributed.hpp)
@@ -357,6 +358,7 @@ 
target_link_libraries(quickstep_queryexecution_WorkerSelectionPolicy
 add_library(quickstep_queryexecution ../empty_src.cpp QueryExecutionModule.hpp)
 target_link_libraries(quickstep_queryexecution
   quickstep_queryexecution_AdmitRequestMessage
+  quickstep_queryexecution_ExecutionDeserializer
   quickstep_queryexecution_ForemanBase
   quickstep_queryexecution_ForemanSingleNode
   quickstep_queryexecution_PolicyEnforcerBase

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/0221d135/query_execution/ExecutionDeserializer.cpp
--
diff --git a/query_execution/ExecutionDeserializer.cpp 
b/query_execution/ExecutionDeserializer.cpp
new file mode 100644
index 000..bb2b4b0
--- /dev/null
+++ b/query_execution/ExecutionDeserializer.cpp
@@ -0,0 +1,112 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ **/
+
+#include "query_execution/ExecutionDeserializer.hpp"
+
+namespace quickstep {
+namespace optimizer {
+
+void ExecutionDeserializer::deserializePlan() const {
+
+}
+
+void ExecutionDeserializer::deserializeInternal(const RelationalOperator 
&relational_operator) {
+  switch (relational_operator.getOperatorType()) {
+  case RelationalOperator::kAggregation:
+deserializeAggregation(
+static_cast(relational_operator));
+  case RelationalOperator::kBuildAggregationExistenceMap:
+deserializeBuildAggregationExistenceMap(
+
static_cast(relational_operator));
+  case RelationalOperator::kBuildHash:
+deserializeBuildHash(
+static_cast(relational_operator));
+  case RelationalOperator::kBuildLIPFilter:
+deserializeBuildLIPFilter(
+static_cast(relational_operator));
+  case RelationalOperator::kCreateIndex:
+deserializeCreateIndex(
+static_cast(relational_operator));
+  case RelationalOperator::kCreateTable:
+deserializeC