Skip to content

Conversation

@dengsh12
Copy link
Collaborator

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

Add basic support for checkpointProtection table feature in Kernel. When a table has checkpointProtection enabled, Kernel throws an exception when attempting to checkpoint.

How was this patch tested?

Added tests

Does this PR introduce any user-facing changes?

No

Comment on lines 397 to 403
spark.sql(s"CREATE TABLE delta.`$tablePath` (id INT) USING delta " +
"TBLPROPERTIES ('delta.feature.checkpointProtection' = 'supported')")

// Add some data to create commits
for (_ <- 0 to 3) {
spark.sql(s"INSERT INTO delta.`$tablePath` VALUES (1), (2), (3)")
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you need to use delta-spark? Couldn't you use kernel to create the table? and look at other tests for how we append/insert data?

val ex = intercept[Exception] {
kernelCheckpoint(tc, tablePath, checkpointVersion = 4)
}
assert(ex.getMessage.contains("checkpointProtection"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Assert more of the error message please. this makes reading this single test even cleaner.

Copy link
Collaborator

@scottsand-db scottsand-db left a comment

Choose a reason for hiding this comment

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

Awesome! Nice and short and simple. Thank you! A few comments on the test -- After those are addressed, will stamp 🚀

@dengsh12 dengsh12 changed the title [Kernel] Add basic support for checkpointProtection [Kernel] Add basic support for checkpointProtection by throwing exception on checkpoint Jan 23, 2026
@dengsh12
Copy link
Collaborator Author

Awesome! Nice and short and simple. Thank you! A few comments on the test -- After those are addressed, will stamp 🚀

Thanks for the suggestions, really good points! Fixed the test, still pending the discussion about a corner case

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.

2 participants