Skip to content

Commit

Permalink
fix: added data clearing to period_union
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed May 11, 2021
1 parent c3b178f commit e027018
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions aw-transform/src/period_union.rs
@@ -1,6 +1,5 @@
use super::sort::sort_by_timestamp;
use aw_models::Event;
use chrono::{DateTime, Utc};
use std::collections::VecDeque;

/// Takes a list of two events and returns a new list of events covering the union
Expand Down Expand Up @@ -47,11 +46,13 @@ pub fn period_union(events1: &[Event], events2: &[Event]) -> Vec<Event> {
}
}

// for event in merged_events:
// # Clear data
// event.data = {}

events_union
.drain(..)
.map(|mut e| {
e.data = json_map! {};
e
})
.collect()
}

#[cfg(test)]
Expand Down

0 comments on commit e027018

Please sign in to comment.