From 91371d5d901263f59be2b55963b3f84163d24a93 Mon Sep 17 00:00:00 2001 From: Roscoe Pyell Date: Thu, 20 Apr 2017 23:29:30 -0700 Subject: [PATCH 1/5] Update BQ Query parameter reference Update BigQuery Query parameter reference to better indicate that timeout_ms sets timeout on the request, not on the query. --- bigquery/google/cloud/bigquery/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery/google/cloud/bigquery/query.py b/bigquery/google/cloud/bigquery/query.py index 3c2e398e5f41..401179447fa5 100644 --- a/bigquery/google/cloud/bigquery/query.py +++ b/bigquery/google/cloud/bigquery/query.py @@ -383,7 +383,7 @@ def fetch_data(self, max_results=None, page_token=None, start_index=None, :type timeout_ms: int :param timeout_ms: - (Optional) timeout, in milliseconds, to wait for query to complete + (Optional) timeout, in milliseconds, to wait for request to complete :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` From 9144d09691e4da809bb62b4bf051960931f4fda6 Mon Sep 17 00:00:00 2001 From: Roscoe Pyell Date: Thu, 20 Apr 2017 23:43:20 -0700 Subject: [PATCH 2/5] Fix line length Fix line length issue on timeout_ms parameter. --- bigquery/google/cloud/bigquery/query.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bigquery/google/cloud/bigquery/query.py b/bigquery/google/cloud/bigquery/query.py index 401179447fa5..8bf7457fe0a2 100644 --- a/bigquery/google/cloud/bigquery/query.py +++ b/bigquery/google/cloud/bigquery/query.py @@ -383,7 +383,8 @@ def fetch_data(self, max_results=None, page_token=None, start_index=None, :type timeout_ms: int :param timeout_ms: - (Optional) timeout, in milliseconds, to wait for request to complete + (Optional) timeout, in milliseconds, to wait for http request + to complete :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` From 5da59e96e4b6bb21a749a8378062d3acbc1d691c Mon Sep 17 00:00:00 2001 From: Roscoe Pyell Date: Thu, 20 Apr 2017 23:59:56 -0700 Subject: [PATCH 3/5] Fix trailing whitespace This is my punishment for not using a proper editor. Removed trailing whitespace. --- bigquery/google/cloud/bigquery/query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bigquery/google/cloud/bigquery/query.py b/bigquery/google/cloud/bigquery/query.py index 8bf7457fe0a2..70282840cc8b 100644 --- a/bigquery/google/cloud/bigquery/query.py +++ b/bigquery/google/cloud/bigquery/query.py @@ -383,8 +383,8 @@ def fetch_data(self, max_results=None, page_token=None, start_index=None, :type timeout_ms: int :param timeout_ms: - (Optional) timeout, in milliseconds, to wait for http request - to complete + (Optional) timeout, in milliseconds, to wait for http request + to complete. :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` From b163c4368ea8badf857a489e7e9e14226be15157 Mon Sep 17 00:00:00 2001 From: Roscoe Pyell Date: Mon, 24 Apr 2017 12:26:04 -0700 Subject: [PATCH 4/5] Include full API reference Makes the param ref a little long but there won't be any confusion until the API docs change and this will need updating. --- bigquery/google/cloud/bigquery/query.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bigquery/google/cloud/bigquery/query.py b/bigquery/google/cloud/bigquery/query.py index 70282840cc8b..31531ad0eddf 100644 --- a/bigquery/google/cloud/bigquery/query.py +++ b/bigquery/google/cloud/bigquery/query.py @@ -383,8 +383,13 @@ def fetch_data(self, max_results=None, page_token=None, start_index=None, :type timeout_ms: int :param timeout_ms: - (Optional) timeout, in milliseconds, to wait for http request - to complete. + (Optional) How long to wait for the query to complete, in + milliseconds, before the request times out and returns. Note that + this is only a timeout for the request, not the query. If the query + takes longer to run than the timeout value, the call returns without + any results and with the 'jobComplete' flag set to false. You can + call GetQueryResults() to wait for the query to complete and read + the results. The default value is 10000 milliseconds (10 seconds). :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType`` From d1accdbd241412a979d01a6f66b314048302ac81 Mon Sep 17 00:00:00 2001 From: Roscoe Pyell Date: Mon, 24 Apr 2017 14:57:53 -0700 Subject: [PATCH 5/5] Fix line length I keep forgetting it's 79 and not 80. --- bigquery/google/cloud/bigquery/query.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bigquery/google/cloud/bigquery/query.py b/bigquery/google/cloud/bigquery/query.py index 31531ad0eddf..6b764f3c664d 100644 --- a/bigquery/google/cloud/bigquery/query.py +++ b/bigquery/google/cloud/bigquery/query.py @@ -386,10 +386,11 @@ def fetch_data(self, max_results=None, page_token=None, start_index=None, (Optional) How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query - takes longer to run than the timeout value, the call returns without - any results and with the 'jobComplete' flag set to false. You can - call GetQueryResults() to wait for the query to complete and read - the results. The default value is 10000 milliseconds (10 seconds). + takes longer to run than the timeout value, the call returns + without any results and with the 'jobComplete' flag set to false. + You can call GetQueryResults() to wait for the query to complete + and read the results. The default value is 10000 milliseconds (10 + seconds). :type client: :class:`~google.cloud.bigquery.client.Client` or ``NoneType``