Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: added document of QueryPlanEntry and QueryPlanEntryStep #344

Merged
merged 1 commit into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Job-Related Types
job.CreateDisposition
job.DestinationFormat
job.Encoding
job.QueryPlanEntry
job.QueryPlanEntryStep
job.QueryPriority
job.SourceFormat
job.WriteDisposition
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/bigquery/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -2844,7 +2844,7 @@ def query_plan(self):
https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobStatistics2.FIELDS.query_plan

Returns:
List[QueryPlanEntry]:
List[google.cloud.bigquery.job.QueryPlanEntry]:
mappings describing the query plan, or an empty list
if the query has not yet completed.
"""
Expand Down Expand Up @@ -3418,7 +3418,6 @@ class QueryPlanEntryStep(object):

Args:
kind (str): step type.

substeps (List): names of substeps.
"""

Expand All @@ -3434,7 +3433,8 @@ def from_api_repr(cls, resource):
resource (Dict): JSON representation of the entry.

Returns:
QueryPlanEntryStep: new instance built from the resource.
google.cloud.bigquery.job.QueryPlanEntryStep:
New instance built from the resource.
"""
return cls(kind=resource.get("kind"), substeps=resource.get("substeps", ()))

Expand Down Expand Up @@ -3464,7 +3464,7 @@ def from_api_repr(cls, resource):
ExplainQueryStage representation returned from API.

Returns:
google.cloud.bigquery.QueryPlanEntry:
google.cloud.bigquery.job.QueryPlanEntry:
Query plan entry parsed from ``resource``.
"""
entry = cls()
Expand Down