Skip to content

Commit 8f6cd60

Browse files
fix for query with hot tier files
create list of hot tier files where path matches manifest files remaining hot tier files will be set as remainder to be served from S3
1 parent 007325c commit 8f6cd60

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

server/src/hottier.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,12 @@ impl HotTierManager {
575575
stream: &str,
576576
manifest_files: Vec<File>,
577577
) -> Result<(Vec<File>, Vec<File>), HotTierError> {
578-
let hot_tier_files = self.get_hot_tier_parquet_files(stream).await?;
578+
let mut hot_tier_files = self.get_hot_tier_parquet_files(stream).await?;
579+
hot_tier_files.retain(|file| {
580+
manifest_files
581+
.iter()
582+
.any(|manifest_file| manifest_file.file_path.eq(&file.file_path))
583+
});
579584
let remaining_files: Vec<File> = manifest_files
580585
.into_iter()
581586
.filter(|manifest_file| {
@@ -584,7 +589,6 @@ impl HotTierManager {
584589
.all(|file| !file.file_path.eq(&manifest_file.file_path))
585590
})
586591
.collect();
587-
588592
Ok((hot_tier_files, remaining_files))
589593
}
590594

0 commit comments

Comments
 (0)