Skip to content

Commit

Permalink
fix: incorrect date range selection (#26646)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
pauldambra and github-actions[bot] authored Dec 4, 2024
1 parent 8eef695 commit 5e9ae64
Show file tree
Hide file tree
Showing 6 changed files with 1,338 additions and 1,552 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -276,21 +276,23 @@ def _where_predicates(self) -> Union[ast.And, ast.Or]:
)
)

if self._query.date_from:
query_date_from = self.query_date_range.date_from()
if query_date_from:
exprs.append(
ast.CompareOperation(
op=ast.CompareOperationOp.GtEq,
left=ast.Field(chain=["s", "min_first_timestamp"]),
right=ast.Constant(value=self.query_date_range.date_from()),
right=ast.Constant(value=query_date_from),
)
)

if self._query.date_to:
query_date_to = self.query_date_range.date_to()
if query_date_to:
exprs.append(
ast.CompareOperation(
op=ast.CompareOperationOp.LtEq,
left=ast.Field(chain=["s", "min_first_timestamp"]),
right=ast.Constant(value=self.query_date_range.date_to()),
right=ast.Constant(value=query_date_to),
)
)

Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 5e9ae64

Please sign in to comment.