Skip to content

Commit

Permalink
added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Aug 7, 2024
1 parent e67ca72 commit 4319ac7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions google/cloud/datastore/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ def explain_metrics(self) -> ExplainMetrics:
raise QueryExplainError("explain_options not set on query.")
elif self._aggregation_query._explain_options.analyze is False:
# we need to run the query to get the explain_metrics
# analyze=False only returns explain_metrics, no results
self._next_page()
if self._explain_metrics is not None:
return self._explain_metrics
Expand Down
1 change: 1 addition & 0 deletions google/cloud/datastore/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ def explain_metrics(self) -> ExplainMetrics:
raise QueryExplainError("explain_options not set on query.")
elif self._query._explain_options.analyze is False:
# we need to run the query to get the explain_metrics
# analyze=False only returns explain_metrics, no results
self._next_page()
if self._explain_metrics is not None:
return self._explain_metrics
Expand Down

0 comments on commit 4319ac7

Please sign in to comment.