Skip to content

Commit

Permalink
update for merge data source
Browse files Browse the repository at this point in the history
  • Loading branch information
bryevdv committed Oct 23, 2023
1 parent d7694c9 commit e418767
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/merge_data.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::collections::VecDeque;

use crate::data::{
DataSourceInfo, EntryID, EntryIndex, EntryInfo, Field, ItemLink, ItemUID, SlotMetaTile,
SlotTile, SummaryTile, TileID,
DataSourceDescription, DataSourceInfo, EntryID, EntryIndex, EntryInfo, Field, ItemLink,
ItemUID, SlotMetaTile, SlotTile, SummaryTile, TileID,
};
use crate::deferred_data::DeferredDataSource;
use crate::timestamp::Interval;
Expand Down Expand Up @@ -192,6 +192,16 @@ impl MergeDeferredDataSource {
}

impl DeferredDataSource for MergeDeferredDataSource {
fn fetch_description(&self) -> DataSourceDescription {
DataSourceDescription {
source_locator: self.data_sources.iter().fold(Vec::new(), |acc, x| {
acc.into_iter()
.chain(x.fetch_description().source_locator)
.collect()
}),
}
}

fn fetch_info(&mut self) {
for data_source in &mut self.data_sources {
data_source.fetch_info();
Expand Down

0 comments on commit e418767

Please sign in to comment.