fix(time_offset): improved LIMIT-handling in advanced analytics (#27934)

This commit is contained in:
Antonio Rivero
2024-04-12 00:54:21 +02:00
committed by GitHub
parent 02b69709bb
commit 6844735a45
2 changed files with 73 additions and 1 deletions

View File

@@ -455,6 +455,13 @@ class QueryContextProcessor:
for metric in metric_names
}
# When the original query has limit or offset we wont apply those
# to the subquery so we prevent data inconsistency due to missing records
# in the dataframes when performing the join
if query_object.row_limit or query_object.row_offset:
query_object_clone_dct["row_limit"] = config["ROW_LIMIT"]
query_object_clone_dct["row_offset"] = 0
if isinstance(self._qc_datasource, Query):
result = self._qc_datasource.exc_query(query_object_clone_dct)
else: