sqlglot 27.4.0__py3-none-any.whl → 27.4.1__py3-none-any.whl
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.
- sqlglot/_version.py +2 -2
- sqlglot/dialects/bigquery.py +4 -2
- {sqlglot-27.4.0.dist-info → sqlglot-27.4.1.dist-info}/METADATA +1 -1
- {sqlglot-27.4.0.dist-info → sqlglot-27.4.1.dist-info}/RECORD +7 -7
- {sqlglot-27.4.0.dist-info → sqlglot-27.4.1.dist-info}/WHEEL +0 -0
- {sqlglot-27.4.0.dist-info → sqlglot-27.4.1.dist-info}/licenses/LICENSE +0 -0
- {sqlglot-27.4.0.dist-info → sqlglot-27.4.1.dist-info}/top_level.txt +0 -0
sqlglot/_version.py
CHANGED
sqlglot/dialects/bigquery.py
CHANGED
|
@@ -378,11 +378,13 @@ def _annotate_array(self: TypeAnnotator, expression: exp.Array) -> exp.Array:
|
|
|
378
378
|
and (query_type := select.meta.get("query_type")) is not None
|
|
379
379
|
and query_type.is_type(exp.DataType.Type.STRUCT)
|
|
380
380
|
and len(query_type.expressions) == 1
|
|
381
|
+
and isinstance(col_def := query_type.expressions[0], exp.ColumnDef)
|
|
382
|
+
and (projection_type := col_def.kind) is not None
|
|
383
|
+
and not projection_type.is_type(exp.DataType.Type.UNKNOWN)
|
|
381
384
|
):
|
|
382
|
-
projection_type = query_type.expressions[0].kind.copy()
|
|
383
385
|
array_type = exp.DataType(
|
|
384
386
|
this=exp.DataType.Type.ARRAY,
|
|
385
|
-
expressions=[projection_type],
|
|
387
|
+
expressions=[projection_type.copy()],
|
|
386
388
|
nested=True,
|
|
387
389
|
)
|
|
388
390
|
return self._annotate_with_type(expression, array_type)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
sqlglot/__init__.py,sha256=za08rtdPh2v7dOpGdNomttlIVGgTrKja7rPd6sQwaTg,5391
|
|
2
2
|
sqlglot/__main__.py,sha256=022c173KqxsiABWTEpUIq_tJUxuNiW7a7ABsxBXqvu8,2069
|
|
3
3
|
sqlglot/_typing.py,sha256=-1HPyr3w5COlSJWqlgt8jhFk2dyMvBuvVBqIX1wyVCM,642
|
|
4
|
-
sqlglot/_version.py,sha256=
|
|
4
|
+
sqlglot/_version.py,sha256=jOZXO_b65dIa3g-RaYPPvo31yJxPamFz_P4zbdxLZ2o,513
|
|
5
5
|
sqlglot/diff.py,sha256=PtOllQMQa1Sw1-V2Y8eypmDqGujXYPaTOp_WLsWkAWk,17314
|
|
6
6
|
sqlglot/errors.py,sha256=QNKMr-pzLUDR-tuMmn_GK6iMHUIVdb_YSJ_BhGEvuso,2126
|
|
7
7
|
sqlglot/expressions.py,sha256=Q52dXK5i-R4jtqHd2-Tj533GiOHxATrPxot68oV7Vfc,246122
|
|
@@ -20,7 +20,7 @@ sqlglot/transforms.py,sha256=s96QMtR7rJbcLAU1I_IF1xLNxno6yvEbhERgbS5xmJ4,41164
|
|
|
20
20
|
sqlglot/trie.py,sha256=v27uXMrHfqrXlJ6GmeTSMovsB_3o0ctnlKhdNt7W6fI,2245
|
|
21
21
|
sqlglot/dialects/__init__.py,sha256=BQUv9EuMmvhP_wVitGLo0PlCi15atvfXgvREpsTsxeQ,3799
|
|
22
22
|
sqlglot/dialects/athena.py,sha256=ofArmayYLev4qZQ15GM8mevG04qqR5WGFb2ZcuYm6x4,10966
|
|
23
|
-
sqlglot/dialects/bigquery.py,sha256=
|
|
23
|
+
sqlglot/dialects/bigquery.py,sha256=iNadAdOITTTaOcEwhL735BRNPoxtGG207L9fX7CR6zY,56446
|
|
24
24
|
sqlglot/dialects/clickhouse.py,sha256=UY1hFC83RMO2bum1UFfGBey_wmKPBKlsWD5nxbrqeyg,57000
|
|
25
25
|
sqlglot/dialects/databricks.py,sha256=mJN2lFpqgH95x3mtry3qWbuRf4q7NV5jbRAOspqclzY,4548
|
|
26
26
|
sqlglot/dialects/dialect.py,sha256=O8fYmv1iFEfmXa1mUwEZ7GgPsfG51_VuHSv8E_zOw0k,71039
|
|
@@ -76,8 +76,8 @@ sqlglot/optimizer/qualify_tables.py,sha256=rRo0rXMMDAloG_ut7nGPtIO3e__ooM2PqShxW
|
|
|
76
76
|
sqlglot/optimizer/scope.py,sha256=HI3TZ4VWTgM6_x8k5ClA0lA0xidaKv4xgn8iGERJRjk,30824
|
|
77
77
|
sqlglot/optimizer/simplify.py,sha256=-_yus42OYwqjQ9a2TSGhtG2G0pSkInUry1z7hEMz2pY,51062
|
|
78
78
|
sqlglot/optimizer/unnest_subqueries.py,sha256=kzWUVDlxs8z9nmRx-8U-pHXPtVZhEIwkKqmKhr2QLvc,10908
|
|
79
|
-
sqlglot-27.4.
|
|
80
|
-
sqlglot-27.4.
|
|
81
|
-
sqlglot-27.4.
|
|
82
|
-
sqlglot-27.4.
|
|
83
|
-
sqlglot-27.4.
|
|
79
|
+
sqlglot-27.4.1.dist-info/licenses/LICENSE,sha256=AI3__mHZfOtzY3EluR_pIYBm3_pE7TbVx7qaHxoZ114,1065
|
|
80
|
+
sqlglot-27.4.1.dist-info/METADATA,sha256=QgRU7ePRB-jDv1RMJMz1ey_5cK8TZqrmeJ5XKosvD7o,20731
|
|
81
|
+
sqlglot-27.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
82
|
+
sqlglot-27.4.1.dist-info/top_level.txt,sha256=5kRskCGA_gVADF9rSfSzPdLHXqvfMusDYeHePfNY2nQ,8
|
|
83
|
+
sqlglot-27.4.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|