Skip to content

Commit

Permalink
Rm empty case from visit_match's
Browse files Browse the repository at this point in the history
  • Loading branch information
aliu39 committed Oct 16, 2024
1 parent 68b70a2 commit fbe791f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/sentry/replays/usecases/query/conditions/aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,12 @@ def visit_neq(expression: Expression, value: str) -> Condition:

@staticmethod
def visit_match(expression: Expression, value: str) -> Condition:
if value == "":
return SumOfStringScalar.visit_eq(expression, value)
# Assumes this is only called on wildcard strings, so `value` is non-empty.
return contains(StringScalar.visit_match(expression, value))

@staticmethod
def visit_not_match(expression: Expression, value: str) -> Condition:
if value == "":
return SumOfStringScalar.visit_neq(expression, value)
# Assumes this is only called on wildcard strings, so `value` is non-empty.
return does_not_contain(StringScalar.visit_match(expression, value))

@staticmethod
Expand Down

0 comments on commit fbe791f

Please sign in to comment.