Skip to content
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

[WIP] [Kernel] Catalog Commits (CCv2) Prototype #4128

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

scottsand-db
Copy link
Collaborator

...

////////////////////////

class InMemoryCCv2Client extends CCv2Client {
override def resolveTable(tableName: String): ResolvedMetadata = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

// UC_REST_CLIENT
uc_catalog.delta.protocol.$field1

// GLUE_REST_CLIENT
glue_catalog.delta.protocol.$field1

Should the UC_CCV2_CLIENT and the GLUE_CCV2_CLIENT then translate to KERNEL?

kernel.delta.protocol

Q: if we give them a bag of properties, will they add a prefix? are they responsible for stripping the prefix when they give the bag of properties back to us?

Q: is the goal that the CCv2 clients should not have to do a bunch of translation / deep understanding?

Intuition: Kernel should be able to commit a bag of properties and then get back that exact same bag of properties. Maybe the CCv2 client needs to add/strip some prefixes when it goes back and forth to the catalog.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the interface Kernel <> CCv2Client should be the bag of properties

////////////////////////

class InMemoryCCv2Client extends CCv2Client {
override def resolveTable(tableName: String): ResolvedMetadata = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

resolveTableAsBagOfProperties(tableName: String) -> Map<String, String>

@scottsand-db scottsand-db force-pushed the kernel_ccv2_prototype_a branch from bcf2d04 to 3b32f86 Compare February 7, 2025 23:20
val txnState = txn.getTransactionState(defaultEngine)
val stagedFiles = stageData(txnState, Map.empty, data.toList)
val stagedActionsIterable = CloseableIterable.inMemoryIterable(stagedFiles)
txn.commit(defaultEngine, stagedActionsIterable)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

val fileActions = ...
val allActions = txn.finalizeActions(fileActions, ...)
ResolvedMetadata::commit(allActions, ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant