Skip to content

Commit

Permalink
test(database): added testcases for database optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoysrt committed Dec 20, 2024
1 parent ea7abae commit cc23f60
Show file tree
Hide file tree
Showing 2 changed files with 660 additions and 2 deletions.
3 changes: 1 addition & 2 deletions agent/database_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ def potential_indexes(self) -> list[DBIndex]:
# Top N query variant - Order by column can possibly speed up the query
if (
order_by_columns := self.parsed_query.columns_dict.get("order_by")
and self.parsed_query.limit_and_offset
):
) and self.parsed_query.limit_and_offset:
possible_indexes.extend(order_by_columns)

possible_db_indexes = [self._convert_to_db_index(i) for i in possible_indexes]
Expand Down
Loading

0 comments on commit cc23f60

Please sign in to comment.