Skip to content

Single part checkpoint write api #779

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

Draft
wants to merge 50 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
435302e
introduce visitors
sebastiantia Mar 12, 2025
e500a10
remove pub
sebastiantia Mar 12, 2025
19733cd
assert! instead of assert_eq with bool
sebastiantia Mar 12, 2025
87c9f31
log replay for checkpoints
sebastiantia Mar 13, 2025
db5ccd0
rename & some clean up
sebastiantia Mar 13, 2025
42c08c1
remove new path for now
sebastiantia Mar 13, 2025
f91baeb
merge non file action visitor tests
sebastiantia Mar 22, 2025
9fdfba7
mvp for refactor
sebastiantia Mar 24, 2025
d420fd1
these github action checks clog my screen
sebastiantia Mar 24, 2025
9e0e048
base file actions struct
sebastiantia Mar 25, 2025
303444b
combine visitors
sebastiantia Mar 25, 2025
5dbc924
fmt
sebastiantia Mar 26, 2025
b793961
remove old code
sebastiantia Mar 26, 2025
508976f
move FileActionKey
sebastiantia Mar 26, 2025
bccaa17
Merge branch 'main' into checkpoint-visitors
sebastiantia Mar 26, 2025
a23d7cb
merge
sebastiantia Mar 26, 2025
0160ef1
fix whitespace
sebastiantia Mar 26, 2025
aae7046
remove old code
sebastiantia Mar 26, 2025
f574370
refactor more
sebastiantia Mar 26, 2025
a618833
refactor
sebastiantia Mar 26, 2025
7da74b2
more docs
sebastiantia Mar 26, 2025
220a216
invert is_log_batch logic
sebastiantia Mar 26, 2025
9d86911
docs
sebastiantia Mar 26, 2025
e5b0e32
docs
sebastiantia Mar 26, 2025
a5393dc
docs and imports
sebastiantia Mar 26, 2025
a23c651
improve mod doc
sebastiantia Mar 27, 2025
d712d18
improve doc
sebastiantia Mar 27, 2025
e564ae1
docs'
sebastiantia Mar 27, 2025
b14ff19
docs
sebastiantia Mar 27, 2025
a52d484
update
sebastiantia Mar 27, 2025
a243a98
nits
sebastiantia Mar 27, 2025
9f06382
Revert "nits"
sebastiantia Mar 28, 2025
58f38c0
nits
sebastiantia Mar 28, 2025
628546c
refactor
sebastiantia Mar 27, 2025
88cf983
move
sebastiantia Mar 27, 2025
10bb7b5
fix rebase
sebastiantia Mar 28, 2025
0054c71
merge
sebastiantia Mar 28, 2025
abc7e1f
merge fixes
sebastiantia Mar 28, 2025
7fbfe29
mvp
sebastiantia Mar 29, 2025
f72234f
Merge branch 'main' into single-part-checkpoint-write-api
sebastiantia Mar 29, 2025
5abba3d
usize & ulong type conversions
sebastiantia Mar 30, 2025
80fc936
finalize_checkpoint API
sebastiantia Mar 30, 2025
5e4df58
nits
sebastiantia Mar 30, 2025
c8bcc2e
ignore doc test
sebastiantia Mar 30, 2025
c4ba531
rename and update struct types
sebastiantia Mar 31, 2025
f935ad7
doc update
sebastiantia Mar 31, 2025
2a78848
fix build and docs
sebastiantia Mar 31, 2025
4ed5ba2
Merge branch 'update-last-checkpoint-hint' into single-part-checkpoin…
sebastiantia Mar 31, 2025
6231d84
revert primtiive additions
sebastiantia Mar 31, 2025
3f2c0f9
add the CheckpointMetadata action batch for v2 checkpoints
sebastiantia Apr 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions acceptance/tests/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
/// Since each new `.rs` file in this directory results in increased build and link time, it is
/// important to only add new files if absolutely necessary for code readability or test
/// performance.
use delta_kernel::snapshot::CheckpointMetadata;
use delta_kernel::snapshot::LastCheckpointHint;

#[test]
fn test_checkpoint_serde() {
let file = std::fs::File::open(
"./tests/dat/out/reader_tests/generated/with_checkpoint/delta/_delta_log/_last_checkpoint",
)
.unwrap();
let cp: CheckpointMetadata = serde_json::from_reader(file).unwrap();
let cp: LastCheckpointHint = serde_json::from_reader(file).unwrap();
assert_eq!(cp.version, 2)
}

Expand Down
2 changes: 2 additions & 0 deletions ffi/src/expressions/kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ pub struct EngineExpressionVisitor {
pub visit_literal_int: VisitLiteralFn<i32>,
/// Visit a 64bit `long` belonging to the list identified by `sibling_list_id`.
pub visit_literal_long: VisitLiteralFn<i64>,
/// Visit a 64bit unsigned `long` belonging to the list identified by `sibling_list_id`.
pub visit_literal_uint: VisitLiteralFn<u32>,
/// Visit a 16bit `short` belonging to the list identified by `sibling_list_id`.
pub visit_literal_short: VisitLiteralFn<i16>,
/// Visit an 8bit `byte` belonging to the list identified by `sibling_list_id`.
Expand Down
4 changes: 1 addition & 3 deletions kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ thiserror = "1"
# only for structured logging
tracing = { version = "0.1", features = ["log"] }
url = "2"
uuid = "1.10.0"
uuid = { version = "1.10.0", features = ["v4", "fast-rng"] }
z85 = "3.0.5"

# bring in our derive macros
Expand Down Expand Up @@ -118,8 +118,6 @@ default-engine-base = [
"need_arrow",
"object_store",
"tokio",
"uuid/v4",
"uuid/fast-rng",
]

# the default-engine use the reqwest crate with default features which uses native-tls. if you want
Expand Down
13 changes: 13 additions & 0 deletions kernel/src/actions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,19 @@ pub(crate) struct SetTransaction {
pub(crate) last_updated: Option<i64>,
}

/// The CheckpointMetadata action describes details about a checkpoint following the V2 specification.
///
/// [More info]: https://github.com/delta-io/delta/blob/master/PROTOCOL.md#checkpoint-metadata
#[derive(Schema, Debug, PartialEq)]
#[cfg_attr(feature = "developer-visibility", visibility::make(pub))]
pub(crate) struct CheckpointMetadata {
/// The version of the V2 spec checkpoint.
pub(crate) version: i64,

/// Map containing any additional metadata about the V2 spec checkpoint.
pub(crate) tags: Option<HashMap<String, String>>,
}

/// The sidecar action references a sidecar file which provides some of the checkpoint's
/// file actions. This action is only allowed in checkpoints following the V2 spec.
///
Expand Down
9 changes: 9 additions & 0 deletions kernel/src/actions/schemas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ pub(crate) trait ToSchema {
fn to_schema() -> StructType;
}

/// Implement ToSchema for StructType to enable its use within Option<T> fields
/// in schema-derived structs. This follows the system pattern where schema types
/// implement ToSchema rather than directly implementing ToDataType.
impl ToSchema for StructType {
fn to_schema() -> StructType {
StructType::new(vec![])
}
}

pub(crate) trait ToDataType {
fn to_data_type() -> DataType;
}
Expand Down
Loading
Loading