-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Kernel] [CatalogManaged] Add new builder .withCommitter API; Create DefaultCommitter skeleton #4936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Kernel] [CatalogManaged] Add new builder .withCommitter API; Create DefaultCommitter skeleton #4936
Conversation
import io.delta.kernel.internal.tablefeatures.TableFeatures; | ||
import io.delta.kernel.utils.CloseableIterator; | ||
|
||
public class DefaultFileSystemManagedTableOnlyCommitter implements Committer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: This will get more complex later on as we implement it properly
throw new UnsupportedOperationException("Default Committer not yet implemented"); | ||
} | ||
|
||
private void validateProtocol(Protocol protocol) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentionally included in this PR? it looks a bit wired that we do some check then throw unsupported error. (but ok with that given DefaultFileSystemManagedTableOnlyCommitter will be implemented shortly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! Yup, intentionally included.
I think it's important for us to all agree from the get go that the default committer should not be able to write into catalog managed tables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
0d0d475
to
9e7062d
Compare
🥞 Stacked PR
Use this link to review incremental changes.
Which Delta project/connector is this regarding?
Description
#4814 introduced new TransactionV2, Committer, CommitContext, etc APIs.
This PR now adds the abilities for Engines to inject into Kernel the actual Committer.
This PR also includes a no-op Default committer implementation that validates that it is not interacting with catalog-managed tables. We do this because: ResolvedTable does not return an Optional committer, but rather just a committer. So we need to give it something in the case that no committer was provided to the table builder.
How was this patch tested?
New UTs.
Does this PR introduce any user-facing changes?
New .withCommitter API