sqlframe 3.43.0__py3-none-any.whl → 3.43.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 +3 -3
- sqlframe/base/functions.py +26 -6
- {sqlframe-3.43.0.dist-info → sqlframe-3.43.1.dist-info}/METADATA +2 -2
- {sqlframe-3.43.0.dist-info → sqlframe-3.43.1.dist-info}/RECORD +7 -7
- {sqlframe-3.43.0.dist-info → sqlframe-3.43.1.dist-info}/LICENSE +0 -0
- {sqlframe-3.43.0.dist-info → sqlframe-3.43.1.dist-info}/WHEEL +0 -0
- {sqlframe-3.43.0.dist-info → sqlframe-3.43.1.dist-info}/top_level.txt +0 -0
sqlframe/_version.py
CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
28
28
|
commit_id: COMMIT_ID
|
29
29
|
__commit_id__: COMMIT_ID
|
30
30
|
|
31
|
-
__version__ = version = '3.43.
|
32
|
-
__version_tuple__ = version_tuple = (3, 43,
|
31
|
+
__version__ = version = '3.43.1'
|
32
|
+
__version_tuple__ = version_tuple = (3, 43, 1)
|
33
33
|
|
34
|
-
__commit_id__ = commit_id = '
|
34
|
+
__commit_id__ = commit_id = 'g07ceeb0ec'
|
sqlframe/base/functions.py
CHANGED
@@ -2729,7 +2729,7 @@ def aggregate(
|
|
2729
2729
|
return Column.invoke_expression_over_column(col, expression.Reduce, **kwargs)
|
2730
2730
|
|
2731
2731
|
|
2732
|
-
@meta(unsupported_engines="postgres")
|
2732
|
+
@meta(unsupported_engines=["bigquery", "postgres", "snowflake"])
|
2733
2733
|
def transform(
|
2734
2734
|
col: ColumnOrName,
|
2735
2735
|
f: t.Union[t.Callable[[Column], Column], t.Callable[[Column, Column], Column]],
|
@@ -7169,12 +7169,32 @@ def _lambda_quoted(value: str) -> t.Optional[bool]:
|
|
7169
7169
|
|
7170
7170
|
@meta()
|
7171
7171
|
def _get_lambda_from_func(lambda_expression: t.Callable):
|
7172
|
-
|
7173
|
-
|
7174
|
-
|
7175
|
-
|
7172
|
+
import inspect
|
7173
|
+
|
7174
|
+
# Get the function signature
|
7175
|
+
sig = inspect.signature(lambda_expression)
|
7176
|
+
param_names = list(sig.parameters.keys())
|
7177
|
+
|
7178
|
+
# Check if this looks like a column function (single 'col' parameter)
|
7179
|
+
if len(param_names) == 1 and param_names[0] in ["col", "column"]:
|
7180
|
+
# Wrap column functions to work with transform
|
7181
|
+
variables = [expression.to_identifier("x", quoted=_lambda_quoted("x"))]
|
7182
|
+
result = lambda_expression(Column("x"))
|
7183
|
+
return expression.Lambda(
|
7184
|
+
this=result.column_expression,
|
7185
|
+
expressions=variables,
|
7186
|
+
)
|
7187
|
+
|
7188
|
+
# Handle regular functions and lambdas
|
7189
|
+
var_names = lambda_expression.__code__.co_varnames[: lambda_expression.__code__.co_argcount]
|
7190
|
+
|
7191
|
+
variables = [expression.to_identifier(x, quoted=_lambda_quoted(x)) for x in var_names]
|
7192
|
+
|
7193
|
+
# Call with Column objects for each parameter
|
7194
|
+
result = lambda_expression(*[Column(x) for x in var_names])
|
7195
|
+
|
7176
7196
|
return expression.Lambda(
|
7177
|
-
this=
|
7197
|
+
this=result.column_expression,
|
7178
7198
|
expressions=variables,
|
7179
7199
|
)
|
7180
7200
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sqlframe
|
3
|
-
Version: 3.43.
|
3
|
+
Version: 3.43.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
|
@@ -18,7 +18,7 @@ Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
19
19
|
Requires-Dist: more-itertools
|
20
20
|
Requires-Dist: prettytable <4
|
21
|
-
Requires-Dist: sqlglot <27.
|
21
|
+
Requires-Dist: sqlglot <27.17,>=24.0.0
|
22
22
|
Requires-Dist: typing-extensions
|
23
23
|
Provides-Extra: bigquery
|
24
24
|
Requires-Dist: google-cloud-bigquery-storage <3,>=2 ; extra == 'bigquery'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
sqlframe/__init__.py,sha256=SB80yLTITBXHI2GCDS6n6bN5ObHqgPjfpRPAUwxaots,3403
|
2
|
-
sqlframe/_version.py,sha256=
|
2
|
+
sqlframe/_version.py,sha256=J2b9R7RcIQKVNt66tZoZMlGnx0Hhbva3g6YxYwpILD4,714
|
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
|
@@ -9,7 +9,7 @@ sqlframe/base/dataframe.py,sha256=wT3R2Qmq4edOefxXCRepiMDNJfVOIvSf6eHd6GOn4i0,88
|
|
9
9
|
sqlframe/base/decorators.py,sha256=IhE5xNQDkwJHacCvulq5WpUKyKmXm7dL2A3o5WuKGP4,2131
|
10
10
|
sqlframe/base/exceptions.py,sha256=9Uwvqn2eAkDpqm4BrRgbL61qM-GMCbJEMAW8otxO46s,370
|
11
11
|
sqlframe/base/function_alternatives.py,sha256=aTu3nQhIAkZoxrI1IpjpaHEAMxBNms0AnhS0EMR-TwY,51727
|
12
|
-
sqlframe/base/functions.py,sha256=
|
12
|
+
sqlframe/base/functions.py,sha256=bA6LuduIBcBgG9mE1GXmrO0zxcPV_Yx8pytRoqOZ0Zo,229602
|
13
13
|
sqlframe/base/group.py,sha256=fBm8EUve7W7xz11nybTXr09ih-yZxL_vvEiZVE1eb_0,12025
|
14
14
|
sqlframe/base/normalize.py,sha256=YPeopWr8ZRjevArYfrM-DZBkQp4t4UfAEwynoj4VvcU,11773
|
15
15
|
sqlframe/base/operations.py,sha256=g-YNcbvNKTOBbYm23GKfB3fmydlR7ZZDAuZUtXIHtzw,4438
|
@@ -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.43.
|
134
|
-
sqlframe-3.43.
|
135
|
-
sqlframe-3.43.
|
136
|
-
sqlframe-3.43.
|
137
|
-
sqlframe-3.43.
|
133
|
+
sqlframe-3.43.1.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
|
134
|
+
sqlframe-3.43.1.dist-info/METADATA,sha256=QRiDOgcTBZwCscawbAcGZzIXpzlWE1tfbysgGDLzOnU,9070
|
135
|
+
sqlframe-3.43.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
136
|
+
sqlframe-3.43.1.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
|
137
|
+
sqlframe-3.43.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|