sqlframe 3.35.0__py3-none-any.whl → 3.35.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.
- sqlframe/_version.py +2 -2
- sqlframe/base/function_alternatives.py +0 -56
- sqlframe/base/functions.py +3 -14
- sqlframe/base/types.py +4 -4
- {sqlframe-3.35.0.dist-info → sqlframe-3.35.1.dist-info}/METADATA +3 -3
- {sqlframe-3.35.0.dist-info → sqlframe-3.35.1.dist-info}/RECORD +9 -9
- {sqlframe-3.35.0.dist-info → sqlframe-3.35.1.dist-info}/LICENSE +0 -0
- {sqlframe-3.35.0.dist-info → sqlframe-3.35.1.dist-info}/WHEEL +0 -0
- {sqlframe-3.35.0.dist-info → sqlframe-3.35.1.dist-info}/top_level.txt +0 -0
sqlframe/_version.py
CHANGED
@@ -999,27 +999,6 @@ def element_at_using_brackets(col: ColumnOrName, value: ColumnOrLiteral) -> Colu
|
|
999
999
|
)
|
1000
1000
|
|
1001
1001
|
|
1002
|
-
def array_remove_using_filter(col: ColumnOrName, value: ColumnOrLiteral) -> Column:
|
1003
|
-
lit = get_func_from_session("lit")
|
1004
|
-
col_func = get_func_from_session("col")
|
1005
|
-
|
1006
|
-
value = value if isinstance(value, Column) else lit(value)
|
1007
|
-
return Column(
|
1008
|
-
expression.Anonymous(
|
1009
|
-
this="LIST_FILTER",
|
1010
|
-
expressions=[
|
1011
|
-
col_func(col).column_expression,
|
1012
|
-
expression.Lambda(
|
1013
|
-
this=expression.NEQ(
|
1014
|
-
this=expression.Identifier(this="x"), expression=value.column_expression
|
1015
|
-
),
|
1016
|
-
expressions=[expression.Identifier(this="x")],
|
1017
|
-
),
|
1018
|
-
],
|
1019
|
-
)
|
1020
|
-
)
|
1021
|
-
|
1022
|
-
|
1023
1002
|
def array_union_using_list_concat(col1: ColumnOrName, col2: ColumnOrName) -> Column:
|
1024
1003
|
col_func = get_func_from_session("col")
|
1025
1004
|
|
@@ -1664,41 +1643,6 @@ def array_position_bgutil(col: ColumnOrName, value: ColumnOrLiteral) -> Column:
|
|
1664
1643
|
)
|
1665
1644
|
|
1666
1645
|
|
1667
|
-
def array_remove_bgutil(col: ColumnOrName, value: ColumnOrLiteral) -> Column:
|
1668
|
-
lit = get_func_from_session("lit")
|
1669
|
-
|
1670
|
-
value_col = value if isinstance(value, Column) else lit(value)
|
1671
|
-
|
1672
|
-
filter_subquery = expression.select(
|
1673
|
-
"*",
|
1674
|
-
).from_(
|
1675
|
-
expression.Unnest(
|
1676
|
-
expressions=[Column.ensure_col(col).column_expression],
|
1677
|
-
alias=expression.TableAlias(
|
1678
|
-
columns=[expression.to_identifier("x")],
|
1679
|
-
),
|
1680
|
-
)
|
1681
|
-
)
|
1682
|
-
|
1683
|
-
agg_subquery = (
|
1684
|
-
expression.select(
|
1685
|
-
expression.Anonymous(
|
1686
|
-
this="ARRAY_AGG",
|
1687
|
-
expressions=[expression.column("x")],
|
1688
|
-
),
|
1689
|
-
)
|
1690
|
-
.from_(filter_subquery.subquery("t"))
|
1691
|
-
.where(
|
1692
|
-
expression.NEQ(
|
1693
|
-
this=expression.column("x", "t"),
|
1694
|
-
expression=value_col.column_expression,
|
1695
|
-
)
|
1696
|
-
)
|
1697
|
-
)
|
1698
|
-
|
1699
|
-
return Column(agg_subquery.subquery())
|
1700
|
-
|
1701
|
-
|
1702
1646
|
def array_distinct_bgutil(col: ColumnOrName) -> Column:
|
1703
1647
|
return Column(
|
1704
1648
|
expression.Anonymous(
|
sqlframe/base/functions.py
CHANGED
@@ -2268,21 +2268,10 @@ def element_at(col: ColumnOrName, value: ColumnOrLiteral) -> Column:
|
|
2268
2268
|
|
2269
2269
|
@meta()
|
2270
2270
|
def array_remove(col: ColumnOrName, value: ColumnOrLiteral) -> Column:
|
2271
|
-
from sqlframe.base.function_alternatives import (
|
2272
|
-
array_remove_bgutil,
|
2273
|
-
array_remove_using_filter,
|
2274
|
-
)
|
2275
|
-
|
2276
|
-
session = _get_session()
|
2277
|
-
|
2278
|
-
if session._is_bigquery:
|
2279
|
-
return array_remove_bgutil(col, value)
|
2280
|
-
|
2281
|
-
if session._is_duckdb:
|
2282
|
-
return array_remove_using_filter(col, value)
|
2283
|
-
|
2284
2271
|
value_col = value if isinstance(value, Column) else lit(value)
|
2285
|
-
return Column.
|
2272
|
+
return Column.invoke_expression_over_column(
|
2273
|
+
col, expression.ArrayRemove, expression=value_col.column_expression
|
2274
|
+
)
|
2286
2275
|
|
2287
2276
|
|
2288
2277
|
@meta(unsupported_engines="postgres")
|
sqlframe/base/types.py
CHANGED
@@ -104,22 +104,22 @@ class FloatType(DataType):
|
|
104
104
|
|
105
105
|
|
106
106
|
class ByteType(DataType):
|
107
|
-
def
|
107
|
+
def simpleString(self) -> str:
|
108
108
|
return "tinyint"
|
109
109
|
|
110
110
|
|
111
111
|
class IntegerType(DataType):
|
112
|
-
def
|
112
|
+
def simpleString(self) -> str:
|
113
113
|
return "int"
|
114
114
|
|
115
115
|
|
116
116
|
class LongType(DataType):
|
117
|
-
def
|
117
|
+
def simpleString(self) -> str:
|
118
118
|
return "bigint"
|
119
119
|
|
120
120
|
|
121
121
|
class ShortType(DataType):
|
122
|
-
def
|
122
|
+
def simpleString(self) -> str:
|
123
123
|
return "smallint"
|
124
124
|
|
125
125
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sqlframe
|
3
|
-
Version: 3.35.
|
3
|
+
Version: 3.35.1
|
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.
|
20
|
+
Requires-Dist: sqlglot <26.26,>=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'
|
@@ -38,7 +38,7 @@ Requires-Dist: pyspark <3.6,>=2 ; extra == 'dev'
|
|
38
38
|
Requires-Dist: pytest-forked ; extra == 'dev'
|
39
39
|
Requires-Dist: pytest-postgresql <8,>=6 ; extra == 'dev'
|
40
40
|
Requires-Dist: pytest-xdist <3.8,>=3.6 ; extra == 'dev'
|
41
|
-
Requires-Dist: pytest <8.
|
41
|
+
Requires-Dist: pytest <8.5,>=8.2.0 ; extra == 'dev'
|
42
42
|
Requires-Dist: ruff <0.12,>=0.4.4 ; extra == 'dev'
|
43
43
|
Requires-Dist: types-psycopg2 <3,>=2.9 ; extra == 'dev'
|
44
44
|
Provides-Extra: docs
|
@@ -1,5 +1,5 @@
|
|
1
1
|
sqlframe/__init__.py,sha256=SB80yLTITBXHI2GCDS6n6bN5ObHqgPjfpRPAUwxaots,3403
|
2
|
-
sqlframe/_version.py,sha256=
|
2
|
+
sqlframe/_version.py,sha256=kPcRtrGIJvBSXjEXIsPZ4vA33McEBwn6hXm6zOraFmM,513
|
3
3
|
sqlframe/py.typed,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
4
4
|
sqlframe/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
sqlframe/base/_typing.py,sha256=b2clI5HI1zEZKB_3Msx3FeAJQyft44ubUifJwQRVXyQ,1298
|
@@ -8,8 +8,8 @@ sqlframe/base/column.py,sha256=5ZnZcn6gCCrAL53-EEHxVQWXG2oijN3RCOhlWmsjbJM,21147
|
|
8
8
|
sqlframe/base/dataframe.py,sha256=0diYONDlet8iZt49LC3vcmfXHAAZ2MovPL2pTXYHj2U,85974
|
9
9
|
sqlframe/base/decorators.py,sha256=IhE5xNQDkwJHacCvulq5WpUKyKmXm7dL2A3o5WuKGP4,2131
|
10
10
|
sqlframe/base/exceptions.py,sha256=9Uwvqn2eAkDpqm4BrRgbL61qM-GMCbJEMAW8otxO46s,370
|
11
|
-
sqlframe/base/function_alternatives.py,sha256=
|
12
|
-
sqlframe/base/functions.py,sha256=
|
11
|
+
sqlframe/base/function_alternatives.py,sha256=EKtDgYyaJSfaSfhs_IemDkpy6VK2E8V6fDvjAqKR_tM,51880
|
12
|
+
sqlframe/base/functions.py,sha256=geB8QRQvyOipB3v_gOC5KhhB--UpKJH0z2dbyRNCNaI,225983
|
13
13
|
sqlframe/base/group.py,sha256=OY4w1WRsCqLgW-Pi7DjF63zbbxSLISCF3qjAbzI2CQ4,4283
|
14
14
|
sqlframe/base/normalize.py,sha256=nXAJ5CwxVf4DV0GsH-q1w0p8gmjSMlv96k_ez1eVul8,3880
|
15
15
|
sqlframe/base/operations.py,sha256=g-YNcbvNKTOBbYm23GKfB3fmydlR7ZZDAuZUtXIHtzw,4438
|
@@ -17,7 +17,7 @@ sqlframe/base/readerwriter.py,sha256=Nb2VJ_HBmLQp5mK8JhnFooZh2ydAaboCAFVPb-4MNX4
|
|
17
17
|
sqlframe/base/session.py,sha256=djXPmuW0cIQYuoE7hegfyvZuKC2D3ABZCjvw-fa1C24,27260
|
18
18
|
sqlframe/base/table.py,sha256=rCeh1W5SWbtEVfkLAUiexzrZwNgmZeptLEmLcM1ABkE,6961
|
19
19
|
sqlframe/base/transforms.py,sha256=y0j3SGDz3XCmNGrvassk1S-owllUWfkHyMgZlY6SFO4,467
|
20
|
-
sqlframe/base/types.py,sha256=
|
20
|
+
sqlframe/base/types.py,sha256=0gebYkJUtaijaqBis2uqE3CRr3PfVTriwyUJ9-7ly_0,12300
|
21
21
|
sqlframe/base/udf.py,sha256=O6hMhBUy9NVv-mhJRtfFhXTIa_-Z8Y_FkmmuOHu0l90,1117
|
22
22
|
sqlframe/base/util.py,sha256=gv_kRc3LxCuQy3t4dHFldV7elB8RU5PMqIN5-xSkWSo,19107
|
23
23
|
sqlframe/base/window.py,sha256=7NaKDTlhun-95LEghukBCjFBwq0RHrPaajWQNCsLxok,4818
|
@@ -130,8 +130,8 @@ sqlframe/standalone/udf.py,sha256=azmgtUjHNIPs0WMVNId05SHwiYn41MKVBhKXsQJ5dmY,27
|
|
130
130
|
sqlframe/standalone/window.py,sha256=6GKPzuxeSapJakBaKBeT9VpED1ACdjggDv9JRILDyV0,35
|
131
131
|
sqlframe/testing/__init__.py,sha256=VVCosQhitU74A3NnE52O4mNtGZONapuEXcc20QmSlnQ,132
|
132
132
|
sqlframe/testing/utils.py,sha256=PFsGZpwNUE_4-g_f43_vstTqsK0AQ2lBneb5Eb6NkFo,13008
|
133
|
-
sqlframe-3.35.
|
134
|
-
sqlframe-3.35.
|
135
|
-
sqlframe-3.35.
|
136
|
-
sqlframe-3.35.
|
137
|
-
sqlframe-3.35.
|
133
|
+
sqlframe-3.35.1.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
|
134
|
+
sqlframe-3.35.1.dist-info/METADATA,sha256=T1Zjv7wX8XssCXYaXa0mrRAR8Br1Udv8Brw0ZqeWj3I,8987
|
135
|
+
sqlframe-3.35.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
136
|
+
sqlframe-3.35.1.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
|
137
|
+
sqlframe-3.35.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|