diff --git a/src/iceberg/catalog.h b/src/iceberg/catalog.h index d033199ca..6c4957ade 100644 --- a/src/iceberg/catalog.h +++ b/src/iceberg/catalog.h @@ -184,64 +184,6 @@ class ICEBERG_EXPORT Catalog { /// \return a Table instance or ErrorKind::kAlreadyExists if the table already exists virtual Result> RegisterTable( const TableIdentifier& identifier, const std::string& metadata_file_location) = 0; - - /// \brief A builder used to create valid tables or start create/replace transactions - class TableBuilder { - public: - virtual ~TableBuilder() = default; - - /// \brief Sets a partition spec for the table - /// - /// \param spec a partition spec - /// \return this for method chaining - virtual TableBuilder& WithPartitionSpec(const PartitionSpec& spec) = 0; - - /// \brief Sets a sort order for the table - /// - /// \param sort_order a sort order - /// \return this for method chaining - virtual TableBuilder& WithSortOrder(const SortOrder& sort_order) = 0; - - /// \brief Sets a location for the table - /// - /// \param location a location - /// \return this for method chaining - virtual TableBuilder& WithLocation(const std::string& location) = 0; - - /// \brief Adds key/value properties to the table - /// - /// \param properties key/value properties - /// \return this for method chaining - virtual TableBuilder& WithProperties( - const std::unordered_map& properties) = 0; - - /// \brief Adds a key/value property to the table - /// - /// \param key a key - /// \param value a value - /// \return this for method chaining - virtual TableBuilder& WithProperty(const std::string& key, - const std::string& value) = 0; - - /// \brief Creates the table - /// - /// \return the created table - virtual std::unique_ptr Create() = 0; - - /// \brief Starts a transaction to create the table - /// - /// \return the Transaction to create the table - virtual std::unique_ptr StageCreate() = 0; - }; - - /// \brief Instantiate a builder to either create a table or start a create/replace - /// transaction - /// - /// \param identifier a table identifier - /// \param schema a schema - /// \return the builder to create a table or start a create/replace transaction - virtual std::unique_ptr BuildTable(const TableIdentifier& identifier, - const Schema& schema) const = 0; }; } // namespace iceberg diff --git a/src/iceberg/catalog/memory/in_memory_catalog.cc b/src/iceberg/catalog/memory/in_memory_catalog.cc index 753c3358a..ebc490103 100644 --- a/src/iceberg/catalog/memory/in_memory_catalog.cc +++ b/src/iceberg/catalog/memory/in_memory_catalog.cc @@ -417,7 +417,6 @@ Status InMemoryCatalog::DropTable(const TableIdentifier& identifier, bool purge) Status InMemoryCatalog::RenameTable(const TableIdentifier& from, const TableIdentifier& to) { - std::unique_lock lock(mutex_); return NotImplemented("rename table"); } @@ -454,9 +453,4 @@ Result> InMemoryCatalog::RegisterTable( return LoadTable(identifier); } -std::unique_ptr InMemoryCatalog::BuildTable( - const TableIdentifier& identifier, const Schema& schema) const { - throw IcebergError("not implemented"); -} - } // namespace iceberg diff --git a/src/iceberg/catalog/memory/in_memory_catalog.h b/src/iceberg/catalog/memory/in_memory_catalog.h index 069a1d004..5d1f2e13c 100644 --- a/src/iceberg/catalog/memory/in_memory_catalog.h +++ b/src/iceberg/catalog/memory/in_memory_catalog.h @@ -97,9 +97,6 @@ class ICEBERG_EXPORT InMemoryCatalog const TableIdentifier& identifier, const std::string& metadata_file_location) override; - std::unique_ptr BuildTable(const TableIdentifier& identifier, - const Schema& schema) const override; - private: std::string catalog_name_; std::unordered_map properties_; diff --git a/src/iceberg/catalog/rest/rest_catalog.cc b/src/iceberg/catalog/rest/rest_catalog.cc index dff52e2af..e4553ace1 100644 --- a/src/iceberg/catalog/rest/rest_catalog.cc +++ b/src/iceberg/catalog/rest/rest_catalog.cc @@ -194,10 +194,4 @@ Result> RestCatalog::RegisterTable( return NotImplemented("Not implemented"); } -std::unique_ptr RestCatalog::BuildTable( - [[maybe_unused]] const TableIdentifier& identifier, - [[maybe_unused]] const Schema& schema) const { - return nullptr; -} - } // namespace iceberg::rest diff --git a/src/iceberg/catalog/rest/rest_catalog.h b/src/iceberg/catalog/rest/rest_catalog.h index 84ab2b9c8..4e191e86f 100644 --- a/src/iceberg/catalog/rest/rest_catalog.h +++ b/src/iceberg/catalog/rest/rest_catalog.h @@ -96,9 +96,6 @@ class ICEBERG_REST_EXPORT RestCatalog : public Catalog { const TableIdentifier& identifier, const std::string& metadata_file_location) override; - std::unique_ptr BuildTable( - const TableIdentifier& identifier, const Schema& schema) const override; - private: RestCatalog(std::unique_ptr config, std::unique_ptr paths); diff --git a/src/iceberg/test/mock_catalog.h b/src/iceberg/test/mock_catalog.h index 7c54ebacb..46f01c8db 100644 --- a/src/iceberg/test/mock_catalog.h +++ b/src/iceberg/test/mock_catalog.h @@ -83,9 +83,6 @@ class MockCatalog : public Catalog { MOCK_METHOD((Result>), RegisterTable, (const TableIdentifier&, const std::string&), (override)); - - MOCK_METHOD((std::unique_ptr), BuildTable, - (const TableIdentifier&, const Schema&), (const, override)); }; } // namespace iceberg