Skip to content

Conversation

@zachschuermann
Copy link
Collaborator

Note

stacked on #1514 (only review last commit)

What changes are proposed in this pull request?

Add StagedCommitter FFI - allow FFI engines to create a StagedCommitter (via create_staged_committer) and start a transaction with a committer (transaction_with_committer) to allow for catalog-managed writes to tables with existing transaction API.

How was this change tested?

todo

@github-actions github-actions bot added the breaking-change Change that require a major version bump label Dec 2, 2025

/// FFI callback for catalog commit operations
pub type CatalogCommitCallback = extern "C" fn(
engine: Handle<SharedExternEngine>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to pass the engine here?

let path_str = staged_commit_path.as_str();
let path_slice = unsafe { KernelStringSlice::new_unsafe(path_str) };

let engine_handle = unsafe { self.engine_handle.clone_handle() };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd need to go look, but i think clone_handle() bumps the refcount, so you need to make it clear that the engine needs to free_engine after this call.

I'd prefer to no need to pass an engine at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Change that require a major version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants