Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/iceberg/catalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,6 @@ class ICEBERG_EXPORT Catalog {
virtual Result<std::shared_ptr<Table>> RegisterTable(
const TableIdentifier& identifier, const std::string& metadata_file_location) = 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<class TableBuilder> BuildTable(
const TableIdentifier& identifier, const Schema& schema) const = 0;

/// \brief A builder used to create valid tables or start create/replace transactions
class TableBuilder {
public:
Expand Down Expand Up @@ -233,6 +224,15 @@ class ICEBERG_EXPORT Catalog {
/// \return the Transaction to create the table
virtual std::unique_ptr<Transaction> 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<class TableBuilder> BuildTable(
const TableIdentifier& identifier, const Schema& schema) const = 0;
};

} // namespace iceberg
2 changes: 1 addition & 1 deletion src/iceberg/catalog/in_memory_catalog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ Result<std::shared_ptr<Table>> InMemoryCatalog::RegisterTable(
return LoadTable(identifier);
}

std::unique_ptr<TableBuilder> InMemoryCatalog::BuildTable(
std::unique_ptr<iceberg::Catalog::TableBuilder> InMemoryCatalog::BuildTable(
const TableIdentifier& identifier, const Schema& schema) const {
throw IcebergError("not implemented");
}
Expand Down
4 changes: 2 additions & 2 deletions src/iceberg/catalog/in_memory_catalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ class ICEBERG_EXPORT InMemoryCatalog
const TableIdentifier& identifier,
const std::string& metadata_file_location) override;

std::unique_ptr<iceberg::TableBuilder> BuildTable(const TableIdentifier& identifier,
const Schema& schema) const override;
std::unique_ptr<iceberg::Catalog::TableBuilder> BuildTable(
const TableIdentifier& identifier, const Schema& schema) const override;

private:
std::string catalog_name_;
Expand Down
Loading