-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
we have a handful of assumptions that float around which aren't well-encoded into the type system, e.g.
- ascending_commit_files (just a name tells you sorting)
- checkpoint_parts: Vec has all the same version
- etc.
we should encode some of these guarantees (e.g. in list_log_files_with_version
output types):
// instead of
pub(crate) fn list_log_files_with_version(
fs_client: &dyn FileSystemClient,
log_root: &Url,
start_version: Option<Version>,
end_version: Option<Version>,
) -> DeltaResult<(Vec<ParsedLogPath>, Vec<ParsedLogPath>)> {
// ...
}
// replace with
pub(crate) fn list_log_files_with_version(
fs_client: &dyn FileSystemClient,
log_root: &Url,
start_version: Option<Version>,
end_version: Option<Version>,
) -> DeltaResult<(SortedCommitFiles, CheckpointParts)> {
// ...
}
struct SortedCommitFiles {
commit_files: Vec<ParsedLogPath>,
is_ascending: bool,
end_version: Version
}
struct CheckpointParts {
checkpoint_parts: Vec<ParsedLogPath>,
checkpoint_version: Version
}
Metadata
Metadata
Assignees
Labels
No labels