sqlalchemy-bigquery 1.14.0__tar.gz → 1.14.1__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.
- {sqlalchemy_bigquery-1.14.0/sqlalchemy_bigquery.egg-info → sqlalchemy_bigquery-1.14.1}/PKG-INFO +6 -6
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/_types.py +1 -1
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/version.py +1 -1
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1/sqlalchemy_bigquery.egg-info}/PKG-INFO +6 -6
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery.egg-info/SOURCES.txt +1 -0
- sqlalchemy_bigquery-1.14.1/tests/unit/test__types.py +232 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/AUTHORS +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/LICENSE +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/MANIFEST.in +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/README.rst +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/pyproject.toml +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/setup.cfg +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/setup.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/__init__.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/_helpers.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/_struct.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/_versions_helpers.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/base.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/geography.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/parse_url.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/requirements.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery.egg-info/dependency_links.txt +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery.egg-info/entry_points.txt +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery.egg-info/requires.txt +4 -4
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery.egg-info/top_level.txt +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/__init__.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/conftest.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/sqlalchemy_dialect_compliance/README.rst +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/sqlalchemy_dialect_compliance/conftest.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/__init__.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/conftest.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/data/sample.json +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/data/sample_one_row.json +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/data/schema.json +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/test__struct.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/test_alembic.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/test_geography.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/test_helpers.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/test_sqlalchemy_bigquery.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/test_sqlalchemy_bigquery_remote.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/__init__.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/conftest.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/fauxdbi.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test__struct.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_alembic.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_catalog_functions.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_comments.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_compiler.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_compliance.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_dialect_types.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_engine.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_geography.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_helpers.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_like_reescape.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_parse_url.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_select.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_sqlalchemy_bigquery.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_table_options.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_version.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_view.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/third_party/sqlalchemy_bigquery_vendored/__init__.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/third_party/sqlalchemy_bigquery_vendored/py.typed +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/third_party/sqlalchemy_bigquery_vendored/sqlalchemy/AUTHORS +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/third_party/sqlalchemy_bigquery_vendored/sqlalchemy/LICENSE +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/third_party/sqlalchemy_bigquery_vendored/sqlalchemy/__init__.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/third_party/sqlalchemy_bigquery_vendored/sqlalchemy/postgresql/__init__.py +0 -0
- {sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/third_party/sqlalchemy_bigquery_vendored/sqlalchemy/postgresql/base.py +0 -0
{sqlalchemy_bigquery-1.14.0/sqlalchemy_bigquery.egg-info → sqlalchemy_bigquery-1.14.1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sqlalchemy-bigquery
|
|
3
|
-
Version: 1.14.
|
|
3
|
+
Version: 1.14.1
|
|
4
4
|
Summary: SQLAlchemy dialect for BigQuery
|
|
5
5
|
Home-page: https://github.com/googleapis/python-bigquery-sqlalchemy
|
|
6
6
|
Author: The Sqlalchemy-Bigquery Authors
|
|
@@ -43,15 +43,15 @@ Requires-Dist: grpcio<2.0.0,>=1.47.0; extra == "bqstorage"
|
|
|
43
43
|
Requires-Dist: grpcio<2.0.0,>=1.49.1; python_version >= "3.11" and extra == "bqstorage"
|
|
44
44
|
Requires-Dist: pyarrow>=3.0.0; extra == "bqstorage"
|
|
45
45
|
Provides-Extra: all
|
|
46
|
-
Requires-Dist: GeoAlchemy2; extra == "all"
|
|
47
|
-
Requires-Dist: pyarrow>=3.0.0; extra == "all"
|
|
48
|
-
Requires-Dist: grpcio<2.0.0,>=1.47.0; extra == "all"
|
|
49
|
-
Requires-Dist: shapely; extra == "all"
|
|
50
46
|
Requires-Dist: alembic; extra == "all"
|
|
47
|
+
Requires-Dist: grpcio<2.0.0,>=1.49.1; python_version >= "3.11" and extra == "all"
|
|
51
48
|
Requires-Dist: packaging; extra == "all"
|
|
49
|
+
Requires-Dist: pyarrow>=3.0.0; extra == "all"
|
|
52
50
|
Requires-Dist: google-cloud-bigquery-storage<3.0.0,>=2.0.0; extra == "all"
|
|
51
|
+
Requires-Dist: shapely; extra == "all"
|
|
53
52
|
Requires-Dist: pytz; extra == "all"
|
|
54
|
-
Requires-Dist: grpcio<2.0.0,>=1.
|
|
53
|
+
Requires-Dist: grpcio<2.0.0,>=1.47.0; extra == "all"
|
|
54
|
+
Requires-Dist: GeoAlchemy2; extra == "all"
|
|
55
55
|
|
|
56
56
|
SQLAlchemy Dialect for BigQuery
|
|
57
57
|
===============================
|
|
@@ -83,7 +83,7 @@ def _get_transitive_schema_fields(fields):
|
|
|
83
83
|
results = []
|
|
84
84
|
for field in fields:
|
|
85
85
|
results += [field]
|
|
86
|
-
if field.field_type in STRUCT_FIELD_TYPES:
|
|
86
|
+
if field.field_type in STRUCT_FIELD_TYPES and field.mode != "REPEATED":
|
|
87
87
|
sub_fields = [
|
|
88
88
|
SchemaField.from_api_repr(
|
|
89
89
|
dict(f.to_api_repr(), name=f"{field.name}.{f.name}")
|
{sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1/sqlalchemy_bigquery.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sqlalchemy-bigquery
|
|
3
|
-
Version: 1.14.
|
|
3
|
+
Version: 1.14.1
|
|
4
4
|
Summary: SQLAlchemy dialect for BigQuery
|
|
5
5
|
Home-page: https://github.com/googleapis/python-bigquery-sqlalchemy
|
|
6
6
|
Author: The Sqlalchemy-Bigquery Authors
|
|
@@ -43,15 +43,15 @@ Requires-Dist: grpcio<2.0.0,>=1.47.0; extra == "bqstorage"
|
|
|
43
43
|
Requires-Dist: grpcio<2.0.0,>=1.49.1; python_version >= "3.11" and extra == "bqstorage"
|
|
44
44
|
Requires-Dist: pyarrow>=3.0.0; extra == "bqstorage"
|
|
45
45
|
Provides-Extra: all
|
|
46
|
-
Requires-Dist: GeoAlchemy2; extra == "all"
|
|
47
|
-
Requires-Dist: pyarrow>=3.0.0; extra == "all"
|
|
48
|
-
Requires-Dist: grpcio<2.0.0,>=1.47.0; extra == "all"
|
|
49
|
-
Requires-Dist: shapely; extra == "all"
|
|
50
46
|
Requires-Dist: alembic; extra == "all"
|
|
47
|
+
Requires-Dist: grpcio<2.0.0,>=1.49.1; python_version >= "3.11" and extra == "all"
|
|
51
48
|
Requires-Dist: packaging; extra == "all"
|
|
49
|
+
Requires-Dist: pyarrow>=3.0.0; extra == "all"
|
|
52
50
|
Requires-Dist: google-cloud-bigquery-storage<3.0.0,>=2.0.0; extra == "all"
|
|
51
|
+
Requires-Dist: shapely; extra == "all"
|
|
53
52
|
Requires-Dist: pytz; extra == "all"
|
|
54
|
-
Requires-Dist: grpcio<2.0.0,>=1.
|
|
53
|
+
Requires-Dist: grpcio<2.0.0,>=1.47.0; extra == "all"
|
|
54
|
+
Requires-Dist: GeoAlchemy2; extra == "all"
|
|
55
55
|
|
|
56
56
|
SQLAlchemy Dialect for BigQuery
|
|
57
57
|
===============================
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Copyright 2025 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import pytest
|
|
16
|
+
|
|
17
|
+
from sqlalchemy_bigquery._types import _get_transitive_schema_fields
|
|
18
|
+
from google.cloud.bigquery.schema import SchemaField
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def create_schema_field_from_dict(schema_dict):
|
|
22
|
+
"""
|
|
23
|
+
Helper function to create a SchemaField object from a dictionary representation.
|
|
24
|
+
"""
|
|
25
|
+
api_repr = {
|
|
26
|
+
"name": schema_dict["name"],
|
|
27
|
+
"type": schema_dict["type"],
|
|
28
|
+
"mode": schema_dict.get("mode", "NULLABLE"),
|
|
29
|
+
"fields": [
|
|
30
|
+
create_schema_field_from_dict(sf_dict).to_api_repr()
|
|
31
|
+
for sf_dict in schema_dict.get("fields", [])
|
|
32
|
+
],
|
|
33
|
+
}
|
|
34
|
+
return SchemaField.from_api_repr(api_repr)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
test_cases = [
|
|
38
|
+
(
|
|
39
|
+
"STRUCT field, not REPEATED, with sub-fields, should recurse",
|
|
40
|
+
[
|
|
41
|
+
create_schema_field_from_dict(
|
|
42
|
+
{
|
|
43
|
+
"name": "s1",
|
|
44
|
+
"type": "STRUCT",
|
|
45
|
+
"mode": "NULLABLE",
|
|
46
|
+
"fields": [
|
|
47
|
+
{"name": "child1", "type": "STRING", "mode": "NULLABLE"}
|
|
48
|
+
],
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
],
|
|
52
|
+
["s1", "s1.child1"],
|
|
53
|
+
),
|
|
54
|
+
(
|
|
55
|
+
"RECORD field (alias for STRUCT), not REPEATED, with sub-fields, should recurse",
|
|
56
|
+
[
|
|
57
|
+
create_schema_field_from_dict(
|
|
58
|
+
{
|
|
59
|
+
"name": "r1",
|
|
60
|
+
"type": "RECORD",
|
|
61
|
+
"mode": "NULLABLE",
|
|
62
|
+
"fields": [
|
|
63
|
+
{"name": "child_r1", "type": "INTEGER", "mode": "NULLABLE"}
|
|
64
|
+
],
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
],
|
|
68
|
+
["r1", "r1.child_r1"],
|
|
69
|
+
),
|
|
70
|
+
(
|
|
71
|
+
"STRUCT field, REPEATED, with sub-fields, should NOT recurse",
|
|
72
|
+
[
|
|
73
|
+
create_schema_field_from_dict(
|
|
74
|
+
{
|
|
75
|
+
"name": "s2",
|
|
76
|
+
"type": "STRUCT",
|
|
77
|
+
"mode": "REPEATED",
|
|
78
|
+
"fields": [
|
|
79
|
+
{"name": "child2", "type": "STRING", "mode": "NULLABLE"}
|
|
80
|
+
],
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
],
|
|
84
|
+
["s2"],
|
|
85
|
+
),
|
|
86
|
+
(
|
|
87
|
+
"Non-STRUCT field (STRING), not REPEATED, should NOT recurse",
|
|
88
|
+
[
|
|
89
|
+
create_schema_field_from_dict(
|
|
90
|
+
{"name": "f1", "type": "STRING", "mode": "NULLABLE"}
|
|
91
|
+
)
|
|
92
|
+
],
|
|
93
|
+
["f1"],
|
|
94
|
+
),
|
|
95
|
+
(
|
|
96
|
+
"Non-STRUCT field (INTEGER), REPEATED, should NOT recurse",
|
|
97
|
+
[
|
|
98
|
+
create_schema_field_from_dict(
|
|
99
|
+
{"name": "f2", "type": "INTEGER", "mode": "REPEATED"}
|
|
100
|
+
)
|
|
101
|
+
],
|
|
102
|
+
["f2"],
|
|
103
|
+
),
|
|
104
|
+
(
|
|
105
|
+
"Deeply nested STRUCT, not REPEATED, should recurse fully",
|
|
106
|
+
[
|
|
107
|
+
create_schema_field_from_dict(
|
|
108
|
+
{
|
|
109
|
+
"name": "s_outer",
|
|
110
|
+
"type": "STRUCT",
|
|
111
|
+
"mode": "NULLABLE",
|
|
112
|
+
"fields": [
|
|
113
|
+
{
|
|
114
|
+
"name": "s_inner1",
|
|
115
|
+
"type": "STRUCT",
|
|
116
|
+
"mode": "NULLABLE",
|
|
117
|
+
"fields": [
|
|
118
|
+
{
|
|
119
|
+
"name": "s_leaf1",
|
|
120
|
+
"type": "STRING",
|
|
121
|
+
"mode": "NULLABLE",
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
{"name": "s_sibling", "type": "INTEGER", "mode": "NULLABLE"},
|
|
126
|
+
{
|
|
127
|
+
"name": "s_inner2_repeated_struct",
|
|
128
|
+
"type": "STRUCT",
|
|
129
|
+
"mode": "REPEATED",
|
|
130
|
+
"fields": [
|
|
131
|
+
{
|
|
132
|
+
"name": "s_leaf2_ignored",
|
|
133
|
+
"type": "BOOLEAN",
|
|
134
|
+
"mode": "NULLABLE",
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
],
|
|
142
|
+
[
|
|
143
|
+
"s_outer",
|
|
144
|
+
"s_outer.s_inner1",
|
|
145
|
+
"s_outer.s_inner1.s_leaf1",
|
|
146
|
+
"s_outer.s_sibling",
|
|
147
|
+
"s_outer.s_inner2_repeated_struct",
|
|
148
|
+
],
|
|
149
|
+
),
|
|
150
|
+
(
|
|
151
|
+
"STRUCT field, not REPEATED, but no sub-fields, should not error and not recurse further",
|
|
152
|
+
[
|
|
153
|
+
create_schema_field_from_dict(
|
|
154
|
+
{"name": "s3", "type": "STRUCT", "mode": "NULLABLE", "fields": []}
|
|
155
|
+
)
|
|
156
|
+
],
|
|
157
|
+
["s3"],
|
|
158
|
+
),
|
|
159
|
+
(
|
|
160
|
+
"Multiple top-level fields with mixed conditions",
|
|
161
|
+
[
|
|
162
|
+
create_schema_field_from_dict(
|
|
163
|
+
{"name": "id", "type": "INTEGER", "mode": "REQUIRED"}
|
|
164
|
+
),
|
|
165
|
+
create_schema_field_from_dict(
|
|
166
|
+
{
|
|
167
|
+
"name": "user_profile",
|
|
168
|
+
"type": "STRUCT",
|
|
169
|
+
"mode": "NULLABLE",
|
|
170
|
+
"fields": [
|
|
171
|
+
{"name": "name", "type": "STRING", "mode": "NULLABLE"},
|
|
172
|
+
{
|
|
173
|
+
"name": "addresses",
|
|
174
|
+
"type": "RECORD",
|
|
175
|
+
"mode": "REPEATED",
|
|
176
|
+
"fields": [
|
|
177
|
+
{
|
|
178
|
+
"name": "street",
|
|
179
|
+
"type": "STRING",
|
|
180
|
+
"mode": "NULLABLE",
|
|
181
|
+
},
|
|
182
|
+
{"name": "city", "type": "STRING", "mode": "NULLABLE"},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
create_schema_field_from_dict(
|
|
189
|
+
{"name": "tags", "type": "STRING", "mode": "REPEATED"}
|
|
190
|
+
),
|
|
191
|
+
],
|
|
192
|
+
["id", "user_profile", "user_profile.name", "user_profile.addresses", "tags"],
|
|
193
|
+
),
|
|
194
|
+
(
|
|
195
|
+
"Empty input list of fields",
|
|
196
|
+
[],
|
|
197
|
+
[],
|
|
198
|
+
),
|
|
199
|
+
(
|
|
200
|
+
"Field type not in STRUCT_FIELD_TYPES and mode is REPEATED",
|
|
201
|
+
[
|
|
202
|
+
create_schema_field_from_dict(
|
|
203
|
+
{"name": "f_arr", "type": "FLOAT", "mode": "REPEATED"}
|
|
204
|
+
)
|
|
205
|
+
],
|
|
206
|
+
["f_arr"],
|
|
207
|
+
),
|
|
208
|
+
(
|
|
209
|
+
"Field type not in STRUCT_FIELD_TYPES and mode is not REPEATED",
|
|
210
|
+
[
|
|
211
|
+
create_schema_field_from_dict(
|
|
212
|
+
{"name": "f_single", "type": "DATE", "mode": "NULLABLE"}
|
|
213
|
+
)
|
|
214
|
+
],
|
|
215
|
+
["f_single"],
|
|
216
|
+
),
|
|
217
|
+
]
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
@pytest.mark.parametrize(
|
|
221
|
+
"description, input_fields_list, expected_field_names", test_cases
|
|
222
|
+
)
|
|
223
|
+
def test_get_transitive_schema_fields_conditions(
|
|
224
|
+
description, input_fields_list, expected_field_names
|
|
225
|
+
):
|
|
226
|
+
"""
|
|
227
|
+
Tests the _get_transitive_schema_fields function, focusing on the conditional logic
|
|
228
|
+
`if field.field_type in STRUCT_FIELD_TYPES and field.mode != "REPEATED":`.
|
|
229
|
+
"""
|
|
230
|
+
result_fields = _get_transitive_schema_fields(input_fields_list)
|
|
231
|
+
result_names = [field.name for field in result_fields]
|
|
232
|
+
assert result_names == expected_field_names, description
|
|
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
|
{sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/_versions_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery/requirements.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery.egg-info/requires.txt
RENAMED
|
@@ -8,14 +8,14 @@ sqlalchemy<3.0.0,>=1.4.16
|
|
|
8
8
|
alembic
|
|
9
9
|
|
|
10
10
|
[all]
|
|
11
|
-
GeoAlchemy2
|
|
12
|
-
pyarrow>=3.0.0
|
|
13
|
-
grpcio<2.0.0,>=1.47.0
|
|
14
|
-
shapely
|
|
15
11
|
alembic
|
|
16
12
|
packaging
|
|
13
|
+
pyarrow>=3.0.0
|
|
17
14
|
google-cloud-bigquery-storage<3.0.0,>=2.0.0
|
|
15
|
+
shapely
|
|
18
16
|
pytz
|
|
17
|
+
grpcio<2.0.0,>=1.47.0
|
|
18
|
+
GeoAlchemy2
|
|
19
19
|
|
|
20
20
|
[all:python_version >= "3.11"]
|
|
21
21
|
grpcio<2.0.0,>=1.49.1
|
{sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/sqlalchemy_bigquery.egg-info/top_level.txt
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
|
{sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/data/sample_one_row.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/system/test_sqlalchemy_bigquery.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_catalog_functions.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
|
{sqlalchemy_bigquery-1.14.0 → sqlalchemy_bigquery-1.14.1}/tests/unit/test_sqlalchemy_bigquery.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
|