pub struct TableCommit { /* private fields */ }Expand description
Table commit logic for Paimon write operations.
Provides atomic commit functionality including append, overwrite and truncate
Implementations§
Source§impl TableCommit
impl TableCommit
pub fn new(table: Table, commit_user: String) -> Self
Sourcepub async fn commit(&self, commit_messages: Vec<CommitMessage>) -> Result<()>
pub async fn commit(&self, commit_messages: Vec<CommitMessage>) -> Result<()>
Commit new files in APPEND mode.
Sourcepub async fn overwrite(&self, commit_messages: Vec<CommitMessage>) -> Result<()>
pub async fn overwrite(&self, commit_messages: Vec<CommitMessage>) -> Result<()>
Overwrite with dynamic partition detection.
Extracts the set of partitions touched by commit_messages and overwrites
only those partitions. For unpartitioned tables this is a full table overwrite.
Sourcepub async fn truncate_partitions(
&self,
partitions: Vec<HashMap<String, Option<Datum>>>,
) -> Result<()>
pub async fn truncate_partitions( &self, partitions: Vec<HashMap<String, Option<Datum>>>, ) -> Result<()>
Drop specific partitions (OVERWRITE with only deletes).
Sourcepub async fn truncate_table(&self) -> Result<()>
pub async fn truncate_table(&self) -> Result<()>
Truncate the entire table (OVERWRITE with no filter, only deletes).
Auto Trait Implementations§
impl Freeze for TableCommit
impl !RefUnwindSafe for TableCommit
impl Send for TableCommit
impl Sync for TableCommit
impl Unpin for TableCommit
impl UnsafeUnpin for TableCommit
impl !UnwindSafe for TableCommit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more