Skip to content
Open
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
1 change: 1 addition & 0 deletions src/iceberg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ set(ICEBERG_SOURCES
transform.cc
transform_function.cc
type.cc
update/update_partition_spec.cc
update/update_properties.cc
util/bucket_util.cc
util/conversions.cc
Expand Down
1 change: 1 addition & 0 deletions src/iceberg/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ iceberg_sources = files(
'transform.cc',
'transform_function.cc',
'type.cc',
'update/update_partition_spec.cc',
'update/update_properties.cc',
'util/bucket_util.cc',
'util/conversions.cc',
Expand Down
5 changes: 5 additions & 0 deletions src/iceberg/table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "iceberg/table_metadata.h"
#include "iceberg/table_properties.h"
#include "iceberg/table_scan.h"
#include "iceberg/update/update_partition_spec.h"
#include "iceberg/update/update_properties.h"
#include "iceberg/util/macros.h"

Expand Down Expand Up @@ -113,6 +114,10 @@ std::unique_ptr<UpdateProperties> Table::UpdateProperties() const {
return std::make_unique<iceberg::UpdateProperties>(identifier_, catalog_, metadata_);
}

std::unique_ptr<UpdatePartitionSpec> Table::UpdateSpec() {
return std::make_unique<UpdatePartitionSpec>(identifier_, catalog_, metadata_);
}

std::unique_ptr<Transaction> Table::NewTransaction() const {
throw NotImplemented("Table::NewTransaction is not implemented");
}
Expand Down
5 changes: 5 additions & 0 deletions src/iceberg/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ class ICEBERG_EXPORT Table {
/// \return a new UpdateProperties instance
virtual std::unique_ptr<iceberg::UpdateProperties> UpdateProperties() const;

/// \brief Create a new UpdatePartitionSpec to alter the partition spec of this table
/// and commit the changes.
/// \return a pointer to the new UpdatePartitionSpec
virtual std::unique_ptr<UpdatePartitionSpec> UpdateSpec();

/// \brief Create a new table scan builder for this table
///
/// Once a table scan builder is created, it can be refined to project columns and
Expand Down
1 change: 1 addition & 0 deletions src/iceberg/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ add_iceberg_test(table_test
table_requirement_test.cc
table_requirements_test.cc
table_update_test.cc
update_partition_spec_test.cc
update_properties_test.cc)

add_iceberg_test(expression_test
Expand Down
1 change: 1 addition & 0 deletions src/iceberg/test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ iceberg_tests = {
'table_requirement_test.cc',
'table_test.cc',
'table_update_test.cc',
'update_partition_spec_test.cc',
'update_properties_test.cc',
),
},
Expand Down
Loading
Loading