quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject incubator-quickstep git commit: Minor cleanups for the create operators.
Date Sat, 26 Aug 2017 20:24:46 GMT
Repository: incubator-quickstep
Updated Branches:
  refs/heads/master 09ccb7ca7 -> 83c4fe557


Minor cleanups for the create operators.


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

Branch: refs/heads/master
Commit: 83c4fe55707fe8e5934d53b28c60673c8cdf66eb
Parents: 09ccb7c
Author: Zuyu Zhang <zuyu@cs.wisc.edu>
Authored: Sat Aug 26 13:46:53 2017 -0500
Committer: Zuyu Zhang <zuyu@cs.wisc.edu>
Committed: Sat Aug 26 15:23:51 2017 -0500

----------------------------------------------------------------------
 relational_operators/CMakeLists.txt          |  4 +--
 relational_operators/CreateIndexOperator.cpp | 40 ---------------------
 relational_operators/CreateIndexOperator.hpp |  9 +++--
 relational_operators/CreateTableOperator.cpp | 43 -----------------------
 relational_operators/CreateTableOperator.hpp |  9 +++--
 5 files changed, 16 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/83c4fe55/relational_operators/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/relational_operators/CMakeLists.txt b/relational_operators/CMakeLists.txt
index 5ad9c3b..6083dd5 100644
--- a/relational_operators/CMakeLists.txt
+++ b/relational_operators/CMakeLists.txt
@@ -38,8 +38,8 @@ add_library(quickstep_relationaloperators_BuildAggregationExistenceMapOperator
             BuildAggregationExistenceMapOperator.hpp)
 add_library(quickstep_relationaloperators_BuildHashOperator BuildHashOperator.cpp BuildHashOperator.hpp)
 add_library(quickstep_relationaloperators_BuildLIPFilterOperator BuildLIPFilterOperator.cpp
BuildLIPFilterOperator.hpp)
-add_library(quickstep_relationaloperators_CreateIndexOperator CreateIndexOperator.cpp CreateIndexOperator.hpp)
-add_library(quickstep_relationaloperators_CreateTableOperator CreateTableOperator.cpp CreateTableOperator.hpp)
+add_library(quickstep_relationaloperators_CreateIndexOperator ../empty_src.cpp CreateIndexOperator.hpp)
+add_library(quickstep_relationaloperators_CreateTableOperator ../empty_src.cpp CreateTableOperator.hpp)
 add_library(quickstep_relationaloperators_DestroyAggregationStateOperator
             DestroyAggregationStateOperator.cpp
             DestroyAggregationStateOperator.hpp)

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/83c4fe55/relational_operators/CreateIndexOperator.cpp
----------------------------------------------------------------------
diff --git a/relational_operators/CreateIndexOperator.cpp b/relational_operators/CreateIndexOperator.cpp
deleted file mode 100644
index ab3624c..0000000
--- a/relational_operators/CreateIndexOperator.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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 "relational_operators/CreateIndexOperator.hpp"
-
-#include <utility>
-
-#include "tmb/id_typedefs.h"
-
-namespace quickstep {
-
-bool CreateIndexOperator::getAllWorkOrders(WorkOrdersContainer *container,
-                                           QueryContext *query_context,
-                                           StorageManager *storage_manager,
-                                           const tmb::client_id scheduler_client_id,
-                                           tmb::MessageBus *bus) {
-  return true;
-}
-
-void CreateIndexOperator::updateCatalogOnCompletion() {
-  relation_->addIndex(index_name_, std::move(index_description_));
-}
-
-}  // namespace quickstep

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/83c4fe55/relational_operators/CreateIndexOperator.hpp
----------------------------------------------------------------------
diff --git a/relational_operators/CreateIndexOperator.hpp b/relational_operators/CreateIndexOperator.hpp
index c08947f..09d5d81 100644
--- a/relational_operators/CreateIndexOperator.hpp
+++ b/relational_operators/CreateIndexOperator.hpp
@@ -22,6 +22,7 @@
 
 #include <cstddef>
 #include <string>
+#include <utility>
 
 #include "catalog/CatalogRelation.hpp"
 #include "relational_operators/RelationalOperator.hpp"
@@ -85,7 +86,9 @@ class CreateIndexOperator : public RelationalOperator {
                         QueryContext *query_context,
                         StorageManager *storage_manager,
                         const tmb::client_id scheduler_client_id,
-                        tmb::MessageBus *bus) override;
+                        tmb::MessageBus *bus) override {
+    return true;
+  }
 
   /**
    * @note no WorkOrder proto generated for this operator.
@@ -94,7 +97,9 @@ class CreateIndexOperator : public RelationalOperator {
     return true;
   }
 
-  void updateCatalogOnCompletion() override;
+  void updateCatalogOnCompletion() override {
+    relation_->addIndex(index_name_, std::move(index_description_));
+  }
 
  private:
   CatalogRelation *relation_;

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/83c4fe55/relational_operators/CreateTableOperator.cpp
----------------------------------------------------------------------
diff --git a/relational_operators/CreateTableOperator.cpp b/relational_operators/CreateTableOperator.cpp
deleted file mode 100644
index 261bec1..0000000
--- a/relational_operators/CreateTableOperator.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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 "relational_operators/CreateTableOperator.hpp"
-
-#include <memory>
-
-#include "catalog/CatalogDatabase.hpp"
-
-#include "tmb/id_typedefs.h"
-
-namespace quickstep {
-
-bool CreateTableOperator::getAllWorkOrders(
-    WorkOrdersContainer *container,
-    QueryContext *query_context,
-    StorageManager *storage_manager,
-    const tmb::client_id scheduler_client_id,
-    tmb::MessageBus *bus) {
-  return true;
-}
-
-void CreateTableOperator::updateCatalogOnCompletion() {
-  database_->addRelation(relation_.release());
-}
-
-}  // namespace quickstep

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/83c4fe55/relational_operators/CreateTableOperator.hpp
----------------------------------------------------------------------
diff --git a/relational_operators/CreateTableOperator.hpp b/relational_operators/CreateTableOperator.hpp
index 4b06abc..52c7846 100644
--- a/relational_operators/CreateTableOperator.hpp
+++ b/relational_operators/CreateTableOperator.hpp
@@ -24,6 +24,7 @@
 #include <string>
 #include <memory>
 
+#include "catalog/CatalogDatabase.hpp"
 #include "catalog/CatalogRelation.hpp"
 #include "relational_operators/RelationalOperator.hpp"
 #include "utility/Macros.hpp"
@@ -84,7 +85,9 @@ class CreateTableOperator : public RelationalOperator {
                         QueryContext *query_context,
                         StorageManager *storage_manager,
                         const tmb::client_id scheduler_client_id,
-                        tmb::MessageBus *bus) override;
+                        tmb::MessageBus *bus) override {
+    return true;
+  }
 
   /**
    * @note no WorkOrder proto generated for this operator.
@@ -93,7 +96,9 @@ class CreateTableOperator : public RelationalOperator {
     return true;
   }
 
-  void updateCatalogOnCompletion() override;
+  void updateCatalogOnCompletion() override {
+    database_->addRelation(relation_.release());
+  }
 
  private:
   std::unique_ptr<CatalogRelation> relation_;


Mime
View raw message