Skip to content

Commit 563a6d2

Browse files
committed
rename to CheckpointManifestReader
1 parent 8b94ac5 commit 563a6d2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

kernel/src/log_reader/manifest.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ use crate::{DeltaResult, Engine, Error, FileMeta, RowVisitor};
1717
/// Phase that processes single-part checkpoint. This also treats the checkpoint as a manifest file
1818
/// and extracts the sidecar actions during iteration.
1919
#[allow(unused)]
20-
pub(crate) struct ManifestPhase {
20+
pub(crate) struct CheckpointManifestReader {
2121
actions: Box<dyn Iterator<Item = DeltaResult<ActionsBatch>> + Send>,
2222
sidecar_visitor: SidecarVisitor,
2323
log_root: Url,
2424
is_complete: bool,
2525
manifest_file: FileMeta,
2626
}
2727

28-
/// Possible transitions after ManifestPhase completes.
28+
/// Possible transitions after CheckpointManifestReader completes.
2929
#[allow(unused)]
3030
pub(crate) enum AfterManifest {
3131
/// Sidecars extracted from the manifest phase
@@ -34,7 +34,7 @@ pub(crate) enum AfterManifest {
3434
Done,
3535
}
3636

37-
impl ManifestPhase {
37+
impl CheckpointManifestReader {
3838
/// Create a new manifest phase for a single-part checkpoint.
3939
///
4040
/// The schema is automatically augmented with the sidecar column since the manifest
@@ -116,7 +116,7 @@ impl ManifestPhase {
116116
}
117117
}
118118

119-
impl Iterator for ManifestPhase {
119+
impl Iterator for CheckpointManifestReader {
120120
type Item = DeltaResult<ActionsBatch>;
121121

122122
fn next(&mut self) -> Option<Self::Item> {
@@ -160,7 +160,8 @@ mod tests {
160160
let log_root = log_segment.log_root.clone();
161161
assert_eq!(log_segment.checkpoint_parts.len(), 1);
162162
let checkpoint_file = &log_segment.checkpoint_parts[0];
163-
let mut manifest_phase = ManifestPhase::try_new(checkpoint_file, log_root, engine.clone())?;
163+
let mut manifest_phase =
164+
CheckpointManifestReader::try_new(checkpoint_file, log_root, engine.clone())?;
164165

165166
// Extract add file paths and verify expectations
166167
let mut file_paths = vec![];
@@ -190,7 +191,7 @@ mod tests {
190191
file_paths.sort();
191192
assert_eq!(
192193
file_paths, expected_add_paths,
193-
"ManifestPhase should extract expected Add file paths from checkpoint"
194+
"CheckpointManifestReader should extract expected Add file paths from checkpoint"
194195
);
195196

196197
// Check sidecars
@@ -269,7 +270,7 @@ mod tests {
269270
fn test_manifest_phase_early_finalize_error() -> DeltaResult<()> {
270271
let (engine, snapshot) = load_extracted_test_table("with_checkpoint_no_last_checkpoint")?;
271272

272-
let manifest_phase = ManifestPhase::try_new(
273+
let manifest_phase = CheckpointManifestReader::try_new(
273274
&snapshot.log_segment().checkpoint_parts[0],
274275
snapshot.log_segment().log_root.clone(),
275276
engine.clone(),

0 commit comments

Comments
 (0)