|
18 | 18 | use std::collections::HashSet; |
19 | 19 | use std::sync::Arc; |
20 | 20 |
|
21 | | -use futures::{Sink, SinkExt}; |
22 | 21 | use futures::future::try_join_all; |
| 22 | +use futures::{Sink, SinkExt}; |
23 | 23 | use once_cell::sync::Lazy; |
24 | 24 |
|
25 | 25 | use crate::delete_file_index::DeleteFileIndex; |
26 | 26 | use crate::error::Result; |
27 | 27 | use crate::scan::DeleteFileContext; |
28 | | -use crate::spec::{ |
29 | | - DataFile, ManifestContentType, ManifestFile, Operation, SnapshotRef, |
30 | | -}; |
| 28 | +use crate::spec::{DataFile, ManifestContentType, ManifestFile, Operation, SnapshotRef}; |
31 | 29 | use crate::table::Table; |
32 | 30 | use crate::util::snapshot::ancestors_between; |
33 | 31 | use crate::{Error, ErrorKind}; |
@@ -131,19 +129,20 @@ pub(crate) trait SnapshotValidator { |
131 | 129 | .collect::<Vec<_>>(), |
132 | 130 | ) |
133 | 131 | .await?; |
134 | | - |
| 132 | + |
135 | 133 | let delete_files_ctx = manifests |
136 | | - .iter() |
137 | | - .flat_map(|manifest| manifest.entries()) |
138 | | - .map(|entry| DeleteFileContext { |
139 | | - manifest_entry: entry.clone(), |
140 | | - partition_spec_id: entry.data_file().partition_spec_id |
141 | | - }).collect::<Vec<_>>(); |
142 | | - |
| 134 | + .iter() |
| 135 | + .flat_map(|manifest| manifest.entries()) |
| 136 | + .map(|entry| DeleteFileContext { |
| 137 | + manifest_entry: entry.clone(), |
| 138 | + partition_spec_id: entry.data_file().partition_spec_id, |
| 139 | + }) |
| 140 | + .collect::<Vec<_>>(); |
| 141 | + |
143 | 142 | for ctx in delete_files_ctx { |
144 | 143 | delete_file_tx.send(ctx).await? |
145 | 144 | } |
146 | | - |
| 145 | + |
147 | 146 | // todo validate if there are deletes |
148 | 147 |
|
149 | 148 | Ok(()) |
|
0 commit comments