Skip to content

Commit

Permalink
Ensure ConfigDiff takes tables into account
Browse files Browse the repository at this point in the history
  • Loading branch information
esensar committed Dec 19, 2024
1 parent cb4dacb commit 31c75fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/config/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,32 @@ impl ConfigDiff {
self.sources.flip();
self.transforms.flip();
self.sinks.flip();
self.enrichment_tables.flip();
self
}

/// Checks whether or not the given component is present at all.
pub fn contains(&self, key: &ComponentKey) -> bool {
self.sources.contains(key) || self.transforms.contains(key) || self.sinks.contains(key)
self.sources.contains(key)
|| self.transforms.contains(key)
|| self.sinks.contains(key)
|| self.enrichment_tables.contains(key)
}

/// Checks whether or not the given component is changed.
pub fn is_changed(&self, key: &ComponentKey) -> bool {
self.sources.is_changed(key)
|| self.transforms.is_changed(key)
|| self.sinks.is_changed(key)
|| self.enrichment_tables.contains(key)
}

/// Checks whether or not the given component is removed.
pub fn is_removed(&self, key: &ComponentKey) -> bool {
self.sources.is_removed(key)
|| self.transforms.is_removed(key)
|| self.sinks.is_removed(key)
|| self.enrichment_tables.contains(key)
}
}

Expand Down

0 comments on commit 31c75fc

Please sign in to comment.