Skip to content

Commit

Permalink
fix: Use False inside or Clickhouse query (#26984)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeelaudibert authored Dec 17, 2024
1 parent 219bad7 commit ce1c717
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ def _current_period_expression(self, field="start_timestamp"):
)

def _previous_period_expression(self, field="start_timestamp"):
# NOTE: Returning `ast.Constant(value=None)` is painfully slow, make sure we return a boolean
if not self.query_compare_to_date_range:
return ast.Constant(value=None)
return ast.Constant(value=False)

return ast.Call(
name="and",
Expand Down

0 comments on commit ce1c717

Please sign in to comment.