google-cloud-bigquery 3.33.0__tar.gz → 3.34.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_bigquery-3.33.0/google_cloud_bigquery.egg-info → google_cloud_bigquery-3.34.0}/PKG-INFO +1 -1
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_helpers.py +1 -1
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_job_helpers.py +2 -10
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_pandas_helpers.py +1 -1
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/client.py +16 -8
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/enums.py +19 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/query.py +1 -1
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/table.py +2 -2
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/version.py +1 -1
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0/google_cloud_bigquery.egg-info}/PKG-INFO +1 -1
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test__job_helpers.py +6 -6
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test__pandas_helpers.py +1 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test__pyarrow_helpers.py +1 -1
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_client.py +11 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_dbapi__helpers.py +1 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_magics.py +5 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_table.py +26 -2
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_table_arrow.py +2 -1
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/LICENSE +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/MANIFEST.in +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/README.rst +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_http.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_pyarrow_helpers.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_tqdm_helpers.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_versions_helpers.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dataset.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dbapi/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dbapi/_helpers.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dbapi/connection.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dbapi/cursor.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dbapi/exceptions.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dbapi/types.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/encryption_configuration.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/exceptions.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/external_config.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/format_options.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/iam.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/base.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/copy_.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/extract.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/load.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/magics/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/magics/line_arg_parser/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/magics/line_arg_parser/exceptions.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/magics/line_arg_parser/lexer.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/magics/line_arg_parser/parser.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/magics/line_arg_parser/visitors.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/magics/magics.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/model.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/opentelemetry_tracing.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/py.typed +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/query.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/retry.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/routine/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/routine/routine.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/schema.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/standard_sql.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery_v2/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery_v2/types/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery_v2/types/encryption_config.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery_v2/types/model.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery_v2/types/model_reference.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery_v2/types/standard_sql.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery_v2/types/table_reference.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google_cloud_bigquery.egg-info/SOURCES.txt +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google_cloud_bigquery.egg-info/dependency_links.txt +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google_cloud_bigquery.egg-info/requires.txt +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google_cloud_bigquery.egg-info/top_level.txt +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/pyproject.toml +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/setup.cfg +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/setup.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/characters.json +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/characters.jsonl +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/colors.avro +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/numeric_38_12.parquet +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/people.csv +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/scalars.csv +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/scalars.jsonl +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/scalars_extreme.jsonl +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/scalars_schema.json +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/scalars_schema_csv.json +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/schema.json +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/scrub_datasets.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/conftest.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/helpers.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_arrow.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_client.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_job_retry.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_list_rows.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_magics.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_pandas.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_query.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_structs.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/_helpers/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/_helpers/test_cell_data_parser.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/_helpers/test_data_frame_cell_data_parser.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/_helpers/test_scalar_query_param_parser.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/conftest.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/helpers.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/helpers.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_base.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_copy.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_extract.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_load.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_load_config.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_query.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_query_config.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_query_pandas.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_query_stats.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/line_arg_parser/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/line_arg_parser/test_lexer.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/line_arg_parser/test_parser.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/line_arg_parser/test_visitors.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/model/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/model/test_model.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/model/test_model_reference.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/routine/__init__.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/routine/test_remote_function_options.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/routine/test_routine.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/routine/test_routine_argument.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/routine/test_routine_reference.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test__helpers.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test__http.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test__versions_helpers.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_create_dataset.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_dataset.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_dbapi_connection.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_dbapi_cursor.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_dbapi_types.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_delete_dataset.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_encryption_configuration.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_external_config.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_format_options.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_job_retry.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_legacy_types.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_datasets.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_jobs.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_models.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_projects.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_routines.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_tables.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_opentelemetry_tracing.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_packaging.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_query.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_retry.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_schema.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_signature_compatibility.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_standard_sql_types.py +0 -0
- {google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_table_pandas.py +0 -0
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_helpers.py
RENAMED
|
@@ -388,7 +388,7 @@ CELL_DATA_PARSER = CellDataParser()
|
|
|
388
388
|
|
|
389
389
|
|
|
390
390
|
class DataFrameCellDataParser(CellDataParser):
|
|
391
|
-
"""Override of CellDataParser to handle differences in
|
|
391
|
+
"""Override of CellDataParser to handle differences in expression of values in DataFrame-like outputs.
|
|
392
392
|
|
|
393
393
|
This is used to turn the output of the REST API into a pyarrow Table,
|
|
394
394
|
emulating the serialized arrow from the BigQuery Storage Read API.
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_job_helpers.py
RENAMED
|
@@ -37,7 +37,6 @@ predicates where it is safe to generate a new query ID.
|
|
|
37
37
|
|
|
38
38
|
import copy
|
|
39
39
|
import functools
|
|
40
|
-
import os
|
|
41
40
|
import uuid
|
|
42
41
|
import textwrap
|
|
43
42
|
from typing import Any, Dict, Optional, TYPE_CHECKING, Union
|
|
@@ -400,12 +399,6 @@ def query_and_wait(
|
|
|
400
399
|
) -> table.RowIterator:
|
|
401
400
|
"""Run the query, wait for it to finish, and return the results.
|
|
402
401
|
|
|
403
|
-
While ``jobCreationMode=JOB_CREATION_OPTIONAL`` is in preview in the
|
|
404
|
-
``jobs.query`` REST API, use the default ``jobCreationMode`` unless
|
|
405
|
-
the environment variable ``QUERY_PREVIEW_ENABLED=true``. After
|
|
406
|
-
``jobCreationMode`` is GA, this method will always use
|
|
407
|
-
``jobCreationMode=JOB_CREATION_OPTIONAL``. See:
|
|
408
|
-
https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query
|
|
409
402
|
|
|
410
403
|
Args:
|
|
411
404
|
client:
|
|
@@ -500,9 +493,8 @@ def query_and_wait(
|
|
|
500
493
|
request_body["maxResults"] = min(page_size, max_results)
|
|
501
494
|
elif page_size is not None or max_results is not None:
|
|
502
495
|
request_body["maxResults"] = page_size or max_results
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
request_body["jobCreationMode"] = "JOB_CREATION_OPTIONAL"
|
|
496
|
+
if client.default_job_creation_mode:
|
|
497
|
+
request_body["jobCreationMode"] = client.default_job_creation_mode
|
|
506
498
|
|
|
507
499
|
def do_query():
|
|
508
500
|
request_body["requestId"] = make_job_id()
|
|
@@ -1144,7 +1144,7 @@ def determine_requested_streams(
|
|
|
1144
1144
|
"""
|
|
1145
1145
|
|
|
1146
1146
|
if preserve_order:
|
|
1147
|
-
# If preserve order is set, it takes
|
|
1147
|
+
# If preserve order is set, it takes precedence.
|
|
1148
1148
|
# Limit the requested streams to 1, to ensure that order
|
|
1149
1149
|
# is preserved)
|
|
1150
1150
|
return 1
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/client.py
RENAMED
|
@@ -221,6 +221,10 @@ class Client(ClientWithProject):
|
|
|
221
221
|
client_options (Optional[Union[google.api_core.client_options.ClientOptions, Dict]]):
|
|
222
222
|
Client options used to set user options on the client. API Endpoint
|
|
223
223
|
should be set through client_options.
|
|
224
|
+
default_job_creation_mode (Optional[str]):
|
|
225
|
+
Sets the default job creation mode used by query methods such as
|
|
226
|
+
query_and_wait(). For lightweight queries, JOB_CREATION_OPTIONAL is
|
|
227
|
+
generally recommended.
|
|
224
228
|
|
|
225
229
|
Raises:
|
|
226
230
|
google.auth.exceptions.DefaultCredentialsError:
|
|
@@ -243,6 +247,7 @@ class Client(ClientWithProject):
|
|
|
243
247
|
client_options: Optional[
|
|
244
248
|
Union[google.api_core.client_options.ClientOptions, Dict[str, Any]]
|
|
245
249
|
] = None,
|
|
250
|
+
default_job_creation_mode: Optional[str] = None,
|
|
246
251
|
) -> None:
|
|
247
252
|
if client_options is None:
|
|
248
253
|
client_options = {}
|
|
@@ -277,6 +282,7 @@ class Client(ClientWithProject):
|
|
|
277
282
|
self._connection = Connection(self, **kw_args)
|
|
278
283
|
self._location = location
|
|
279
284
|
self._default_load_job_config = copy.deepcopy(default_load_job_config)
|
|
285
|
+
self.default_job_creation_mode = default_job_creation_mode
|
|
280
286
|
|
|
281
287
|
# Use property setter so validation can run.
|
|
282
288
|
self.default_query_job_config = default_query_job_config
|
|
@@ -286,6 +292,15 @@ class Client(ClientWithProject):
|
|
|
286
292
|
"""Default location for jobs / datasets / tables."""
|
|
287
293
|
return self._location
|
|
288
294
|
|
|
295
|
+
@property
|
|
296
|
+
def default_job_creation_mode(self):
|
|
297
|
+
"""Default job creation mode used for query execution."""
|
|
298
|
+
return self._default_job_creation_mode
|
|
299
|
+
|
|
300
|
+
@default_job_creation_mode.setter
|
|
301
|
+
def default_job_creation_mode(self, value: Optional[str]):
|
|
302
|
+
self._default_job_creation_mode = value
|
|
303
|
+
|
|
289
304
|
@property
|
|
290
305
|
def default_query_job_config(self) -> Optional[QueryJobConfig]:
|
|
291
306
|
"""Default ``QueryJobConfig`` or ``None``.
|
|
@@ -3532,13 +3547,6 @@ class Client(ClientWithProject):
|
|
|
3532
3547
|
) -> RowIterator:
|
|
3533
3548
|
"""Run the query, wait for it to finish, and return the results.
|
|
3534
3549
|
|
|
3535
|
-
While ``jobCreationMode=JOB_CREATION_OPTIONAL`` is in preview in the
|
|
3536
|
-
``jobs.query`` REST API, use the default ``jobCreationMode`` unless
|
|
3537
|
-
the environment variable ``QUERY_PREVIEW_ENABLED=true``. After
|
|
3538
|
-
``jobCreationMode`` is GA, this method will always use
|
|
3539
|
-
``jobCreationMode=JOB_CREATION_OPTIONAL``. See:
|
|
3540
|
-
https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query
|
|
3541
|
-
|
|
3542
3550
|
Args:
|
|
3543
3551
|
query (str):
|
|
3544
3552
|
SQL query to be executed. Defaults to the standard SQL
|
|
@@ -4134,7 +4142,7 @@ class Client(ClientWithProject):
|
|
|
4134
4142
|
rows that were affected.
|
|
4135
4143
|
query (Optional[str]):
|
|
4136
4144
|
The query text used.
|
|
4137
|
-
total_bytes_processed (
|
|
4145
|
+
total_bytes_processed (Optional[int]):
|
|
4138
4146
|
total bytes processed from job statistics, if present.
|
|
4139
4147
|
|
|
4140
4148
|
Returns:
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/enums.py
RENAMED
|
@@ -407,3 +407,22 @@ class BigLakeTableFormat(object):
|
|
|
407
407
|
|
|
408
408
|
ICEBERG = "ICEBERG"
|
|
409
409
|
"""Apache Iceberg format."""
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
class JobCreationMode(object):
|
|
413
|
+
"""Documented values for Job Creation Mode."""
|
|
414
|
+
|
|
415
|
+
JOB_CREATION_MODE_UNSPECIFIED = "JOB_CREATION_MODE_UNSPECIFIED"
|
|
416
|
+
"""Job creation mode is unspecified."""
|
|
417
|
+
|
|
418
|
+
JOB_CREATION_REQUIRED = "JOB_CREATION_REQUIRED"
|
|
419
|
+
"""Job creation is always required."""
|
|
420
|
+
|
|
421
|
+
JOB_CREATION_OPTIONAL = "JOB_CREATION_OPTIONAL"
|
|
422
|
+
"""Job creation is optional.
|
|
423
|
+
|
|
424
|
+
Returning immediate results is prioritized.
|
|
425
|
+
BigQuery will automatically determine if a Job needs to be created.
|
|
426
|
+
The conditions under which BigQuery can decide to not create a Job are
|
|
427
|
+
subject to change.
|
|
428
|
+
"""
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/query.py
RENAMED
|
@@ -1529,7 +1529,7 @@ class QueryJob(_AsyncJob):
|
|
|
1529
1529
|
a DDL query, an ``_EmptyRowIterator`` instance is returned.
|
|
1530
1530
|
|
|
1531
1531
|
Raises:
|
|
1532
|
-
google.
|
|
1532
|
+
google.api_core.exceptions.GoogleAPICallError:
|
|
1533
1533
|
If the job failed and retries aren't successful.
|
|
1534
1534
|
concurrent.futures.TimeoutError:
|
|
1535
1535
|
If the job did not complete in the given timeout.
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/table.py
RENAMED
|
@@ -44,7 +44,7 @@ try:
|
|
|
44
44
|
import geopandas # type: ignore
|
|
45
45
|
except ImportError:
|
|
46
46
|
geopandas = None
|
|
47
|
-
|
|
47
|
+
finally:
|
|
48
48
|
_COORDINATE_REFERENCE_SYSTEM = "EPSG:4326"
|
|
49
49
|
|
|
50
50
|
try:
|
|
@@ -1786,7 +1786,7 @@ class RowIterator(HTTPIterator):
|
|
|
1786
1786
|
the first page is requested.
|
|
1787
1787
|
query (Optional[str]):
|
|
1788
1788
|
The query text used.
|
|
1789
|
-
total_bytes_processed (
|
|
1789
|
+
total_bytes_processed (Optional[int]):
|
|
1790
1790
|
total bytes processed from job statistics, if present.
|
|
1791
1791
|
"""
|
|
1792
1792
|
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test__job_helpers.py
RENAMED
|
@@ -554,13 +554,9 @@ def test_query_and_wait_retries_job_times_out():
|
|
|
554
554
|
)
|
|
555
555
|
|
|
556
556
|
|
|
557
|
-
def test_query_and_wait_sets_job_creation_mode(
|
|
558
|
-
monkeypatch.setenv(
|
|
559
|
-
"QUERY_PREVIEW_ENABLED",
|
|
560
|
-
# The comparison should be case insensitive.
|
|
561
|
-
"TrUe",
|
|
562
|
-
)
|
|
557
|
+
def test_query_and_wait_sets_job_creation_mode():
|
|
563
558
|
client = mock.create_autospec(Client)
|
|
559
|
+
client.default_job_creation_mode = "JOB_CREATION_OPTIONAL"
|
|
564
560
|
client._call_api.return_value = {
|
|
565
561
|
"jobReference": {
|
|
566
562
|
"projectId": "response-project",
|
|
@@ -642,6 +638,7 @@ def test_query_and_wait_sets_location():
|
|
|
642
638
|
"useInt64Timestamp": True,
|
|
643
639
|
},
|
|
644
640
|
"requestId": mock.ANY,
|
|
641
|
+
"jobCreationMode": mock.ANY,
|
|
645
642
|
},
|
|
646
643
|
timeout=None,
|
|
647
644
|
)
|
|
@@ -658,6 +655,7 @@ def test_query_and_wait_sets_location():
|
|
|
658
655
|
)
|
|
659
656
|
def test_query_and_wait_sets_max_results(max_results, page_size, expected):
|
|
660
657
|
client = mock.create_autospec(Client)
|
|
658
|
+
client.default_job_creation_mode = None
|
|
661
659
|
client._call_api.return_value = {
|
|
662
660
|
"jobReference": {
|
|
663
661
|
"projectId": "response-project",
|
|
@@ -703,6 +701,7 @@ def test_query_and_wait_sets_max_results(max_results, page_size, expected):
|
|
|
703
701
|
|
|
704
702
|
def test_query_and_wait_caches_completed_query_results_one_page():
|
|
705
703
|
client = mock.create_autospec(Client)
|
|
704
|
+
client.default_job_creation_mode = None
|
|
706
705
|
client._call_api.return_value = {
|
|
707
706
|
"jobReference": {
|
|
708
707
|
"projectId": "response-project",
|
|
@@ -768,6 +767,7 @@ def test_query_and_wait_caches_completed_query_results_one_page():
|
|
|
768
767
|
|
|
769
768
|
def test_query_and_wait_caches_completed_query_results_one_page_no_rows():
|
|
770
769
|
client = mock.create_autospec(Client)
|
|
770
|
+
client.default_job_creation_mode = None
|
|
771
771
|
client._call_api.return_value = {
|
|
772
772
|
"jobReference": {
|
|
773
773
|
"projectId": "response-project",
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test__pandas_helpers.py
RENAMED
|
@@ -1856,6 +1856,7 @@ def test__download_table_bqstorage_shuts_down_workers(
|
|
|
1856
1856
|
Make sure that when the top-level iterator goes out of scope (is deleted),
|
|
1857
1857
|
the child threads are also stopped.
|
|
1858
1858
|
"""
|
|
1859
|
+
pytest.importorskip("google.cloud.bigquery_storage_v1")
|
|
1859
1860
|
from google.cloud.bigquery import dataset
|
|
1860
1861
|
from google.cloud.bigquery import table
|
|
1861
1862
|
import google.cloud.bigquery_storage_v1.reader
|
|
@@ -213,6 +213,17 @@ class TestClient(unittest.TestCase):
|
|
|
213
213
|
)
|
|
214
214
|
self.assertEqual(client._connection.API_BASE_URL, "https://bigquery.foo.com")
|
|
215
215
|
|
|
216
|
+
def test_ctor_w_job_creation_mode(self):
|
|
217
|
+
creds = _make_credentials()
|
|
218
|
+
http = object()
|
|
219
|
+
client = self._make_one(
|
|
220
|
+
project=self.PROJECT,
|
|
221
|
+
credentials=creds,
|
|
222
|
+
_http=http,
|
|
223
|
+
default_job_creation_mode="foo",
|
|
224
|
+
)
|
|
225
|
+
self.assertEqual(client.default_job_creation_mode, "foo")
|
|
226
|
+
|
|
216
227
|
def test_ctor_w_location(self):
|
|
217
228
|
from google.cloud.bigquery._http import Connection
|
|
218
229
|
|
|
@@ -1276,6 +1276,11 @@ def test_bigquery_magic_with_no_query_cache(monkeypatch):
|
|
|
1276
1276
|
bigquery.load_ipython_extension(ip)
|
|
1277
1277
|
conn = make_connection()
|
|
1278
1278
|
monkeypatch.setattr(magics.context, "_connection", conn)
|
|
1279
|
+
monkeypatch.setattr(
|
|
1280
|
+
magics.context,
|
|
1281
|
+
"credentials",
|
|
1282
|
+
mock.create_autospec(google.auth.credentials.Credentials, instance=True),
|
|
1283
|
+
)
|
|
1279
1284
|
monkeypatch.setattr(magics.context, "project", "project-from-context")
|
|
1280
1285
|
|
|
1281
1286
|
# --no_query_cache option should override context.
|
|
@@ -2416,6 +2416,7 @@ class Test_EmptyRowIterator(unittest.TestCase):
|
|
|
2416
2416
|
row_iterator.to_arrow()
|
|
2417
2417
|
|
|
2418
2418
|
def test_to_arrow(self):
|
|
2419
|
+
pytest.importorskip("numpy")
|
|
2419
2420
|
pyarrow = pytest.importorskip("pyarrow")
|
|
2420
2421
|
row_iterator = self._make_one()
|
|
2421
2422
|
tbl = row_iterator.to_arrow()
|
|
@@ -2423,6 +2424,7 @@ class Test_EmptyRowIterator(unittest.TestCase):
|
|
|
2423
2424
|
self.assertEqual(tbl.num_rows, 0)
|
|
2424
2425
|
|
|
2425
2426
|
def test_to_arrow_iterable(self):
|
|
2427
|
+
pytest.importorskip("numpy")
|
|
2426
2428
|
pyarrow = pytest.importorskip(
|
|
2427
2429
|
"pyarrow", minversion=self.PYARROW_MINIMUM_VERSION
|
|
2428
2430
|
)
|
|
@@ -3089,6 +3091,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3089
3091
|
bqstorage_client._transport.grpc_channel.close.assert_not_called()
|
|
3090
3092
|
|
|
3091
3093
|
def test_to_arrow(self):
|
|
3094
|
+
pytest.importorskip("numpy")
|
|
3092
3095
|
pyarrow = pytest.importorskip(
|
|
3093
3096
|
"pyarrow", minversion=self.PYARROW_MINIMUM_VERSION
|
|
3094
3097
|
)
|
|
@@ -3173,6 +3176,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3173
3176
|
)
|
|
3174
3177
|
|
|
3175
3178
|
def test_to_arrow_w_nulls(self):
|
|
3179
|
+
pytest.importorskip("numpy")
|
|
3176
3180
|
pyarrow = pytest.importorskip(
|
|
3177
3181
|
"pyarrow", minversion=self.PYARROW_MINIMUM_VERSION
|
|
3178
3182
|
)
|
|
@@ -3209,6 +3213,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3209
3213
|
self.assertEqual(ages, [32, 29, None, 111])
|
|
3210
3214
|
|
|
3211
3215
|
def test_to_arrow_w_unknown_type(self):
|
|
3216
|
+
pytest.importorskip("numpy")
|
|
3212
3217
|
pyarrow = pytest.importorskip(
|
|
3213
3218
|
"pyarrow", minversion=self.PYARROW_MINIMUM_VERSION
|
|
3214
3219
|
)
|
|
@@ -3254,6 +3259,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3254
3259
|
self.assertTrue(all("sport" in str(warning) for warning in warned))
|
|
3255
3260
|
|
|
3256
3261
|
def test_to_arrow_w_empty_table(self):
|
|
3262
|
+
pytest.importorskip("numpy")
|
|
3257
3263
|
pyarrow = pytest.importorskip(
|
|
3258
3264
|
"pyarrow", minversion=self.PYARROW_MINIMUM_VERSION
|
|
3259
3265
|
)
|
|
@@ -3295,6 +3301,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3295
3301
|
self.assertEqual(child_field.type.value_type[1].name, "age")
|
|
3296
3302
|
|
|
3297
3303
|
def test_to_arrow_max_results_w_explicit_bqstorage_client_warning(self):
|
|
3304
|
+
pytest.importorskip("numpy")
|
|
3298
3305
|
pytest.importorskip("pyarrow")
|
|
3299
3306
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
3300
3307
|
from google.cloud.bigquery.schema import SchemaField
|
|
@@ -3337,6 +3344,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3337
3344
|
mock_client._ensure_bqstorage_client.assert_not_called()
|
|
3338
3345
|
|
|
3339
3346
|
def test_to_arrow_max_results_w_create_bqstorage_client_no_warning(self):
|
|
3347
|
+
pytest.importorskip("numpy")
|
|
3340
3348
|
pytest.importorskip("pyarrow")
|
|
3341
3349
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
3342
3350
|
from google.cloud.bigquery.schema import SchemaField
|
|
@@ -3375,6 +3383,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3375
3383
|
mock_client._ensure_bqstorage_client.assert_not_called()
|
|
3376
3384
|
|
|
3377
3385
|
def test_to_arrow_w_bqstorage(self):
|
|
3386
|
+
pytest.importorskip("numpy")
|
|
3378
3387
|
pyarrow = pytest.importorskip("pyarrow")
|
|
3379
3388
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
3380
3389
|
from google.cloud.bigquery import schema
|
|
@@ -3458,6 +3467,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3458
3467
|
bqstorage_client._transport.grpc_channel.close.assert_not_called()
|
|
3459
3468
|
|
|
3460
3469
|
def test_to_arrow_w_bqstorage_creates_client(self):
|
|
3470
|
+
pytest.importorskip("numpy")
|
|
3461
3471
|
pytest.importorskip("pyarrow")
|
|
3462
3472
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
3463
3473
|
from google.cloud.bigquery import schema
|
|
@@ -3491,6 +3501,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3491
3501
|
bqstorage_client._transport.grpc_channel.close.assert_called_once()
|
|
3492
3502
|
|
|
3493
3503
|
def test_to_arrow_ensure_bqstorage_client_wo_bqstorage(self):
|
|
3504
|
+
pytest.importorskip("numpy")
|
|
3494
3505
|
pyarrow = pytest.importorskip(
|
|
3495
3506
|
"pyarrow", minversion=self.PYARROW_MINIMUM_VERSION
|
|
3496
3507
|
)
|
|
@@ -3524,6 +3535,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3524
3535
|
self.assertEqual(tbl.num_rows, 2)
|
|
3525
3536
|
|
|
3526
3537
|
def test_to_arrow_w_bqstorage_no_streams(self):
|
|
3538
|
+
pytest.importorskip("numpy")
|
|
3527
3539
|
pyarrow = pytest.importorskip("pyarrow")
|
|
3528
3540
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
3529
3541
|
from google.cloud.bigquery import schema
|
|
@@ -3563,6 +3575,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3563
3575
|
self.assertEqual(actual_table.schema[2].name, "colB")
|
|
3564
3576
|
|
|
3565
3577
|
def test_to_arrow_progress_bar(self):
|
|
3578
|
+
pytest.importorskip("numpy")
|
|
3566
3579
|
pytest.importorskip("pyarrow")
|
|
3567
3580
|
pytest.importorskip("tqdm")
|
|
3568
3581
|
pytest.importorskip("tqdm.notebook")
|
|
@@ -3696,6 +3709,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3696
3709
|
self.assertEqual(df_2["age"][0], 33)
|
|
3697
3710
|
|
|
3698
3711
|
def test_to_dataframe_iterable_w_bqstorage(self):
|
|
3712
|
+
pytest.importorskip("numpy")
|
|
3699
3713
|
pandas = pytest.importorskip("pandas")
|
|
3700
3714
|
pyarrow = pytest.importorskip("pyarrow")
|
|
3701
3715
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
@@ -3770,6 +3784,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
3770
3784
|
bqstorage_client._transport.grpc_channel.close.assert_not_called()
|
|
3771
3785
|
|
|
3772
3786
|
def test_to_dataframe_iterable_w_bqstorage_max_results_warning(self):
|
|
3787
|
+
pytest.importorskip("numpy")
|
|
3773
3788
|
pandas = pytest.importorskip("pandas")
|
|
3774
3789
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
3775
3790
|
from google.cloud.bigquery import schema
|
|
@@ -4513,7 +4528,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
4513
4528
|
|
|
4514
4529
|
def test_to_dataframe_w_unsupported_dtypes_mapper(self):
|
|
4515
4530
|
pytest.importorskip("pandas")
|
|
4516
|
-
|
|
4531
|
+
numpy = pytest.importorskip("numpy")
|
|
4517
4532
|
from google.cloud.bigquery.schema import SchemaField
|
|
4518
4533
|
|
|
4519
4534
|
schema = [
|
|
@@ -4797,6 +4812,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
4797
4812
|
mock_client._ensure_bqstorage_client.assert_not_called()
|
|
4798
4813
|
|
|
4799
4814
|
def test_to_dataframe_w_bqstorage_creates_client(self):
|
|
4815
|
+
pytest.importorskip("numpy")
|
|
4800
4816
|
pytest.importorskip("pandas")
|
|
4801
4817
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
4802
4818
|
from google.cloud.bigquery import schema
|
|
@@ -4830,6 +4846,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
4830
4846
|
bqstorage_client._transport.grpc_channel.close.assert_called_once()
|
|
4831
4847
|
|
|
4832
4848
|
def test_to_dataframe_w_bqstorage_no_streams(self):
|
|
4849
|
+
pytest.importorskip("numpy")
|
|
4833
4850
|
pytest.importorskip("pandas")
|
|
4834
4851
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
4835
4852
|
from google.cloud.bigquery import schema
|
|
@@ -4858,6 +4875,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
4858
4875
|
self.assertTrue(got.empty)
|
|
4859
4876
|
|
|
4860
4877
|
def test_to_dataframe_w_bqstorage_logs_session(self):
|
|
4878
|
+
pytest.importorskip("numpy")
|
|
4861
4879
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
4862
4880
|
pytest.importorskip("pandas")
|
|
4863
4881
|
pytest.importorskip("pyarrow")
|
|
@@ -4882,6 +4900,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
4882
4900
|
)
|
|
4883
4901
|
|
|
4884
4902
|
def test_to_dataframe_w_bqstorage_empty_streams(self):
|
|
4903
|
+
pytest.importorskip("numpy")
|
|
4885
4904
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
4886
4905
|
pytest.importorskip("pandas")
|
|
4887
4906
|
pyarrow = pytest.importorskip("pyarrow")
|
|
@@ -4936,6 +4955,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
4936
4955
|
self.assertTrue(got.empty)
|
|
4937
4956
|
|
|
4938
4957
|
def test_to_dataframe_w_bqstorage_nonempty(self):
|
|
4958
|
+
pytest.importorskip("numpy")
|
|
4939
4959
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
4940
4960
|
pytest.importorskip("pandas")
|
|
4941
4961
|
pyarrow = pytest.importorskip("pyarrow")
|
|
@@ -5018,6 +5038,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
5018
5038
|
bqstorage_client._transport.grpc_channel.close.assert_not_called()
|
|
5019
5039
|
|
|
5020
5040
|
def test_to_dataframe_w_bqstorage_multiple_streams_return_unique_index(self):
|
|
5041
|
+
pytest.importorskip("numpy")
|
|
5021
5042
|
bigquery_storage = pytest.importorskip("google.cloud.bigquery_storage")
|
|
5022
5043
|
pytest.importorskip("pandas")
|
|
5023
5044
|
pyarrow = pytest.importorskip("pyarrow")
|
|
@@ -5070,6 +5091,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
5070
5091
|
self.assertTrue(got.index.is_unique)
|
|
5071
5092
|
|
|
5072
5093
|
def test_to_dataframe_w_bqstorage_updates_progress_bar(self):
|
|
5094
|
+
pytest.importorskip("numpy")
|
|
5073
5095
|
bigquery_storage = pytest.importorskip("google.cloud.bigquery_storage")
|
|
5074
5096
|
pytest.importorskip("pandas")
|
|
5075
5097
|
pyarrow = pytest.importorskip("pyarrow")
|
|
@@ -5147,6 +5169,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
5147
5169
|
tqdm_mock().close.assert_called_once()
|
|
5148
5170
|
|
|
5149
5171
|
def test_to_dataframe_w_bqstorage_exits_on_keyboardinterrupt(self):
|
|
5172
|
+
pytest.importorskip("numpy")
|
|
5150
5173
|
bigquery_storage = pytest.importorskip("google.cloud.bigquery_storage")
|
|
5151
5174
|
pytest.importorskip("pandas")
|
|
5152
5175
|
pyarrow = pytest.importorskip("pyarrow")
|
|
@@ -5322,6 +5345,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
5322
5345
|
row_iterator.to_dataframe(bqstorage_client)
|
|
5323
5346
|
|
|
5324
5347
|
def test_to_dataframe_concat_categorical_dtype_w_pyarrow(self):
|
|
5348
|
+
pytest.importorskip("numpy")
|
|
5325
5349
|
pytest.importorskip("google.cloud.bigquery_storage")
|
|
5326
5350
|
pandas = pytest.importorskip("pandas")
|
|
5327
5351
|
pyarrow = pytest.importorskip("pyarrow")
|
|
@@ -5604,7 +5628,7 @@ class TestRowIterator(unittest.TestCase):
|
|
|
5604
5628
|
"""
|
|
5605
5629
|
pandas = pytest.importorskip("pandas")
|
|
5606
5630
|
geopandas = pytest.importorskip("geopandas")
|
|
5607
|
-
|
|
5631
|
+
numpy = pytest.importorskip("numpy")
|
|
5608
5632
|
from shapely import wkt
|
|
5609
5633
|
|
|
5610
5634
|
row_iterator = self._make_one_from_data(
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_table_arrow.py
RENAMED
|
@@ -18,7 +18,8 @@ from google.cloud import bigquery
|
|
|
18
18
|
import google.cloud.bigquery.table
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
pytest.importorskip("numpy")
|
|
22
|
+
pytest.importorskip("pyarrow", minversion="3.0.0")
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
def test_to_arrow_with_jobs_query_response():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/__init__.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_http.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/_tqdm_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dataset.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dbapi/cursor.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/dbapi/types.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/__init__.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/base.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/copy_.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/extract.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/job/load.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/magics/magics.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/model.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/py.typed
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/query.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/retry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/schema.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery/standard_sql.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/google/cloud/bigquery_v2/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/numeric_38_12.parquet
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/scalars_extreme.jsonl
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/scalars_schema.json
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/data/scalars_schema_csv.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_job_retry.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/system/test_list_rows.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/_helpers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_extract.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_load_config.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_query_config.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_query_pandas.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/job/test_query_stats.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/line_arg_parser/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/model/test_model.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/routine/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/routine/test_routine.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test__versions_helpers.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_create_dataset.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_dbapi_connection.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_dbapi_cursor.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_dbapi_types.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_delete_dataset.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_external_config.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_format_options.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_legacy_types.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_datasets.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_models.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_projects.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_routines.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_list_tables.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_standard_sql_types.py
RENAMED
|
File without changes
|
{google_cloud_bigquery-3.33.0 → google_cloud_bigquery-3.34.0}/tests/unit/test_table_pandas.py
RENAMED
|
File without changes
|