Minor cleanups for the create operators.
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 @@
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)
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
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 @@
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 @@
return true;
}
- void updateCatalogOnCompletion() override;
+ void updateCatalogOnCompletion() override {
+ relation_->addIndex(index_name_, std::move(index_description_));
+ }
private:
CatalogRelation *relation_;
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
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 @@
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 @@
return true;
}
- void updateCatalogOnCompletion() override;
+ void updateCatalogOnCompletion() override {
+ database_->addRelation(relation_.release());
+ }
private:
std::unique_ptr<CatalogRelation> relation_;