sqlframe 3.22.1__py3-none-any.whl → 3.23.0__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.
sqlframe/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '3.22.1'
21
- __version_tuple__ = version_tuple = (3, 22, 1)
20
+ __version__ = version = '3.23.0'
21
+ __version_tuple__ = version_tuple = (3, 23, 0)
@@ -856,15 +856,21 @@ def expr(str: str) -> Column:
856
856
 
857
857
  @meta(unsupported_engines=["postgres"])
858
858
  def struct(col: t.Union[ColumnOrName, t.Iterable[ColumnOrName]], *cols: ColumnOrName) -> Column:
859
- from sqlframe.base.function_alternatives import struct_with_eq
860
-
861
859
  session = _get_session()
862
-
863
- if session._is_snowflake:
864
- return struct_with_eq(col, *cols)
865
-
866
- columns = ensure_list(col) + list(cols)
867
- return Column.invoke_expression_over_column(None, expression.Struct, expressions=columns)
860
+ col_func = get_func_from_session("col")
861
+
862
+ columns = [col_func(x) for x in ensure_list(col) + list(cols)]
863
+ expressions = []
864
+ for column in columns:
865
+ expressions.append(
866
+ expression.PropertyEQ(
867
+ this=expression.parse_identifier(
868
+ column.alias_or_name, dialect=session.input_dialect
869
+ ),
870
+ expression=column.column_expression,
871
+ )
872
+ )
873
+ return Column(expression.Struct(expressions=expressions))
868
874
 
869
875
 
870
876
  @meta(unsupported_engines=["bigquery", "duckdb", "postgres", "snowflake"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sqlframe
3
- Version: 3.22.1
3
+ Version: 3.23.0
4
4
  Summary: Turning PySpark Into a Universal DataFrame API
5
5
  Home-page: https://github.com/eakmanrq/sqlframe
6
6
  Author: Ryan Eakman
@@ -17,7 +17,7 @@ Requires-Python: >=3.9
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: prettytable <4
20
- Requires-Dist: sqlglot <26.7,>=24.0.0
20
+ Requires-Dist: sqlglot <26.9,>=24.0.0
21
21
  Requires-Dist: typing-extensions
22
22
  Provides-Extra: bigquery
23
23
  Requires-Dist: google-cloud-bigquery-storage <3,>=2 ; extra == 'bigquery'
@@ -25,7 +25,7 @@ Requires-Dist: google-cloud-bigquery[pandas] <4,>=3 ; extra == 'bigquery'
25
25
  Provides-Extra: databricks
26
26
  Requires-Dist: databricks-sql-connector <5,>=3.6 ; extra == 'databricks'
27
27
  Provides-Extra: dev
28
- Requires-Dist: duckdb <1.2,>=0.9 ; extra == 'dev'
28
+ Requires-Dist: duckdb <1.3,>=1.2 ; extra == 'dev'
29
29
  Requires-Dist: findspark <3,>=2 ; extra == 'dev'
30
30
  Requires-Dist: mypy <1.16,>=1.10.0 ; extra == 'dev'
31
31
  Requires-Dist: openai <2,>=1.30 ; extra == 'dev'
@@ -48,7 +48,7 @@ Requires-Dist: mkdocs-material ==9.0.5 ; extra == 'docs'
48
48
  Requires-Dist: mkdocs ==1.4.2 ; extra == 'docs'
49
49
  Requires-Dist: pymdown-extensions ; extra == 'docs'
50
50
  Provides-Extra: duckdb
51
- Requires-Dist: duckdb <1.2,>=0.9 ; extra == 'duckdb'
51
+ Requires-Dist: duckdb <1.3,>=1.2 ; extra == 'duckdb'
52
52
  Requires-Dist: pandas <3,>=2 ; extra == 'duckdb'
53
53
  Provides-Extra: openai
54
54
  Requires-Dist: openai <2,>=1.30 ; extra == 'openai'
@@ -59,7 +59,7 @@ Requires-Dist: psycopg2 <3,>=2.8 ; extra == 'postgres'
59
59
  Provides-Extra: redshift
60
60
  Requires-Dist: redshift-connector <2.2.0,>=2.1.1 ; extra == 'redshift'
61
61
  Provides-Extra: snowflake
62
- Requires-Dist: snowflake-connector-python[secure-local-storage] <3.14,>=3.10.0 ; extra == 'snowflake'
62
+ Requires-Dist: snowflake-connector-python[secure-local-storage] <3.15,>=3.10.0 ; extra == 'snowflake'
63
63
  Provides-Extra: spark
64
64
  Requires-Dist: pyspark <3.6,>=2 ; extra == 'spark'
65
65
 
@@ -1,5 +1,5 @@
1
1
  sqlframe/__init__.py,sha256=wfqm98eLoLid9oV_FzzpG5loKC6LxOhj2lXpfN7SARo,3138
2
- sqlframe/_version.py,sha256=8eLhLry2PxnXZDWV0RoPCF5YsBcUB10-ky6GKcZbQZU,513
2
+ sqlframe/_version.py,sha256=LBEtYNWSnG3GH8sBUqzbBkvKuUnJ78uz2Pmt2SqvhMY,513
3
3
  sqlframe/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  sqlframe/base/_typing.py,sha256=b2clI5HI1zEZKB_3Msx3FeAJQyft44ubUifJwQRVXyQ,1298
5
5
  sqlframe/base/catalog.py,sha256=D39Mn4AIkUyaVyLJiI5gcX0Bv_pChl89GAyYHrtOw5g,38513
@@ -8,7 +8,7 @@ sqlframe/base/dataframe.py,sha256=9wcN5I5bSiGKs6m-mSCwlDUSRfrZ_ymfRUtJa8hggd4,83
8
8
  sqlframe/base/decorators.py,sha256=ms-CvDOIW3T8IVB9VqDmLwAiaEsqXLYRXEqVQaxktiM,1890
9
9
  sqlframe/base/exceptions.py,sha256=9Uwvqn2eAkDpqm4BrRgbL61qM-GMCbJEMAW8otxO46s,370
10
10
  sqlframe/base/function_alternatives.py,sha256=KFkEm0aIHzajvQmiPZnzTLh-Ud9wjeg4lJ4Rk0vk-YU,53674
11
- sqlframe/base/functions.py,sha256=0lLefa959J1z7Ea6QBnQrru06lKCLurEX1xFYxGJbTc,223082
11
+ sqlframe/base/functions.py,sha256=gWUxngV4cgbPvKqK7_N-2rYGycRyoKJnZqPfFyqIgbE,223305
12
12
  sqlframe/base/group.py,sha256=fsyG5990_Pd7gFPjTFrH9IEoAquL_wEkVpIlBAIkZJU,4091
13
13
  sqlframe/base/normalize.py,sha256=nXAJ5CwxVf4DV0GsH-q1w0p8gmjSMlv96k_ez1eVul8,3880
14
14
  sqlframe/base/operations.py,sha256=xSPw74e59wYvNd6U1AlwziNCTG6Aftrbl4SybN9u9VE,3450
@@ -129,8 +129,8 @@ sqlframe/standalone/udf.py,sha256=azmgtUjHNIPs0WMVNId05SHwiYn41MKVBhKXsQJ5dmY,27
129
129
  sqlframe/standalone/window.py,sha256=6GKPzuxeSapJakBaKBeT9VpED1ACdjggDv9JRILDyV0,35
130
130
  sqlframe/testing/__init__.py,sha256=VVCosQhitU74A3NnE52O4mNtGZONapuEXcc20QmSlnQ,132
131
131
  sqlframe/testing/utils.py,sha256=PFsGZpwNUE_4-g_f43_vstTqsK0AQ2lBneb5Eb6NkFo,13008
132
- sqlframe-3.22.1.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
133
- sqlframe-3.22.1.dist-info/METADATA,sha256=T51BFHOahh25l4U0bR07BvwoXMIyO_FvhzwJYA54-sQ,8970
134
- sqlframe-3.22.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
135
- sqlframe-3.22.1.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
136
- sqlframe-3.22.1.dist-info/RECORD,,
132
+ sqlframe-3.23.0.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
133
+ sqlframe-3.23.0.dist-info/METADATA,sha256=li6TMha72t0_876a0_gTA6ckfhiYptkeNrTtZL4c4M0,8970
134
+ sqlframe-3.23.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
135
+ sqlframe-3.23.0.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
136
+ sqlframe-3.23.0.dist-info/RECORD,,