Skip to content

Commit

Permalink
fix: added union_no_overlap to query2 transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Jul 5, 2022
1 parent c1bd040 commit 657aeec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aw_query/functions.py
Expand Up @@ -13,6 +13,7 @@
filter_keyvals,
filter_keyvals_regex,
period_union,
union_no_overlap,
categorize,
tag,
Rule,
Expand Down Expand Up @@ -266,6 +267,12 @@ def q2_concat(events1: list, events2: list) -> List[Event]:
return concat(events1, events2)


@q2_function(union_no_overlap)
@q2_typecheck
def q2_union_no_overlap(events1: list, events2: list) -> List[Event]:
return union_no_overlap(events1, events2)


"""
Flood functions
"""
Expand Down
1 change: 1 addition & 0 deletions aw_transform/union_no_overlap.py
Expand Up @@ -30,6 +30,7 @@ def test_split_event():
e1, e2 = _split_event(e, now + td1h)
assert e1.timestamp == now
assert e1.duration == td1h
assert e2
assert e2.timestamp == now + td1h
assert e2.duration == td1h

Expand Down

0 comments on commit 657aeec

Please sign in to comment.