Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 19 additions & 0 deletions crates/paimon/src/table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ mod read_builder;
pub mod referenced_files;
pub(crate) mod rest_env;
pub(crate) mod row_id_predicate;
mod row_id_reassign;
pub(crate) mod schema_manager;
pub(crate) mod snapshot_commit;
mod snapshot_manager;
Expand All @@ -69,6 +70,7 @@ pub use full_text_search_builder::FullTextSearchBuilder;
use futures::stream::BoxStream;
pub use read_builder::ReadBuilder;
pub use rest_env::RESTEnv;
pub use row_id_reassign::{DataEvolutionRowIdReassigner, ReassignRowIdResult};
pub use schema_manager::SchemaManager;
pub use snapshot_commit::{RESTSnapshotCommit, RenamingSnapshotCommit, SnapshotCommit};
pub use snapshot_manager::SnapshotManager;
Expand Down Expand Up @@ -175,6 +177,23 @@ impl Table {
WriteBuilder::new(self)
}

/// Reassign row IDs for data-evolution tables by rewriting metadata only.
pub async fn reassign_row_ids(&self) -> Result<ReassignRowIdResult> {
DataEvolutionRowIdReassigner::new(self.clone())
.reassign()
.await
}

/// Reassign row IDs for data-evolution tables with a custom commit user.
pub async fn reassign_row_ids_with_commit_user(
&self,
commit_user: impl Into<String>,
) -> Result<ReassignRowIdResult> {
DataEvolutionRowIdReassigner::new(self.clone())
.reassign_with_commit_user(commit_user)
.await
}

/// Create a copy of this table with extra options merged into the schema.
pub fn copy_with_options(&self, extra: HashMap<String, String>) -> Self {
Self {
Expand Down
Loading
Loading