fakesnow 0.9.32__py3-none-any.whl → 0.9.33__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.
@@ -59,9 +59,13 @@ def alter_table_strip_cluster_by(expression: exp.Expression) -> exp.Expression:
59
59
 
60
60
  def array_size(expression: exp.Expression) -> exp.Expression:
61
61
  if isinstance(expression, exp.ArraySize):
62
- # case is used to convert 0 to null, because null is returned by duckdb when no case matches
62
+ # return null if not json array
63
63
  jal = exp.Anonymous(this="json_array_length", expressions=[expression.this])
64
- return exp.Case(ifs=[exp.If(this=jal, true=jal)])
64
+ is_json_array = exp.EQ(
65
+ this=exp.Anonymous(this="json_type", expressions=[expression.this]),
66
+ expression=exp.Literal(this="ARRAY", is_string=True),
67
+ )
68
+ return exp.Case(ifs=[exp.If(this=is_json_array, true=jal)])
65
69
 
66
70
  return expression
67
71
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: fakesnow
3
- Version: 0.9.32
3
+ Version: 0.9.33
4
4
  Summary: Fake Snowflake Connector for Python. Run, mock and test Snowflake DB locally.
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -213,7 +213,7 @@ License-File: LICENSE
213
213
  Requires-Dist: duckdb~=1.2.0
214
214
  Requires-Dist: pyarrow
215
215
  Requires-Dist: snowflake-connector-python
216
- Requires-Dist: sqlglot~=26.10.1
216
+ Requires-Dist: sqlglot~=26.12.1
217
217
  Provides-Extra: dev
218
218
  Requires-Dist: build~=1.0; extra == "dev"
219
219
  Requires-Dist: dirty-equals; extra == "dev"
@@ -233,6 +233,7 @@ Requires-Dist: jupysql; extra == "notebook"
233
233
  Provides-Extra: server
234
234
  Requires-Dist: starlette; extra == "server"
235
235
  Requires-Dist: uvicorn; extra == "server"
236
+ Dynamic: license-file
236
237
 
237
238
  # fakesnow ❄️
238
239
 
@@ -16,13 +16,13 @@ fakesnow/py.typed,sha256=B-DLSjYBi7pkKjwxCSdpVj2J02wgfJr-E7B1wOUyxYU,80
16
16
  fakesnow/rowtype.py,sha256=QUp8EaXD5LT0Xv8BXk5ze4WseEn52xoJ6R05pJjs5mM,2729
17
17
  fakesnow/server.py,sha256=oLnWJgcxwhPw4sNebJF3B9uxk28A-a-AI8Pyl_lz2_E,5986
18
18
  fakesnow/variables.py,sha256=WXyPnkeNwD08gy52yF66CVe2twiYC50tztNfgXV4q1k,3032
19
- fakesnow/transforms/__init__.py,sha256=gD8wPo9QprwHkTOEMQ0-IsXSNfUruU0kBJPjO0po-J4,49377
19
+ fakesnow/transforms/__init__.py,sha256=xFrpw28DaHvMt6LGaRMsPqTo8PWogg10JgEu3oa6jdA,49515
20
20
  fakesnow/transforms/merge.py,sha256=Pg7_rwbAT_vr1U4ocBofUSyqaK8_e3qdIz_2SDm2S3s,8320
21
21
  fakesnow/transforms/show.py,sha256=2qfK3Fi0RLylqTnkwSVgv5JIorXYb1y0fnf5oErRZ2o,16839
22
+ fakesnow-0.9.33.dist-info/licenses/LICENSE,sha256=kW-7NWIyaRMQiDpryfSmF2DObDZHGR1cJZ39s6B1Svg,11344
22
23
  tools/decode.py,sha256=kC5kUvLQxdCkMRsnH6BqCajlKxKeN77w6rwCKsY6gqU,1781
23
- fakesnow-0.9.32.dist-info/LICENSE,sha256=kW-7NWIyaRMQiDpryfSmF2DObDZHGR1cJZ39s6B1Svg,11344
24
- fakesnow-0.9.32.dist-info/METADATA,sha256=HTGvul9rrgbrcSK79gmq4KndGAga0be6WzaKSUc_3c4,18106
25
- fakesnow-0.9.32.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
26
- fakesnow-0.9.32.dist-info/entry_points.txt,sha256=2riAUgu928ZIHawtO8EsfrMEJhi-EH-z_Vq7Q44xKPM,47
27
- fakesnow-0.9.32.dist-info/top_level.txt,sha256=Yos7YveA3f03xVYuURqnBsfMV2DePXfu_yGcsj3pPzI,30
28
- fakesnow-0.9.32.dist-info/RECORD,,
24
+ fakesnow-0.9.33.dist-info/METADATA,sha256=xOQPPYwFTgDETx_lx1bO2nBpD7wbqWwN1rn2U5MJHFw,18128
25
+ fakesnow-0.9.33.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
26
+ fakesnow-0.9.33.dist-info/entry_points.txt,sha256=2riAUgu928ZIHawtO8EsfrMEJhi-EH-z_Vq7Q44xKPM,47
27
+ fakesnow-0.9.33.dist-info/top_level.txt,sha256=Yos7YveA3f03xVYuURqnBsfMV2DePXfu_yGcsj3pPzI,30
28
+ fakesnow-0.9.33.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.1.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5