sqlframe 3.31.0__py3-none-any.whl → 3.31.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/column.py +2 -1
- sqlframe/base/functions.py +7 -4
- {sqlframe-3.31.0.dist-info → sqlframe-3.31.1.dist-info}/METADATA +1 -1
- {sqlframe-3.31.0.dist-info → sqlframe-3.31.1.dist-info}/RECORD +8 -8
- {sqlframe-3.31.0.dist-info → sqlframe-3.31.1.dist-info}/LICENSE +0 -0
- {sqlframe-3.31.0.dist-info → sqlframe-3.31.1.dist-info}/WHEEL +0 -0
- {sqlframe-3.31.0.dist-info → sqlframe-3.31.1.dist-info}/top_level.txt +0 -0
sqlframe/_version.py
CHANGED
sqlframe/base/column.py
CHANGED
@@ -430,8 +430,9 @@ class Column:
|
|
430
430
|
)
|
431
431
|
|
432
432
|
def over(self, window: WindowSpec) -> Column:
|
433
|
+
column_expression = self.column_expression.meta.get("window_func", self.column_expression)
|
433
434
|
window_expression = window.expression.copy()
|
434
|
-
window_expression.set("this",
|
435
|
+
window_expression.set("this", column_expression)
|
435
436
|
return Column(window_expression)
|
436
437
|
|
437
438
|
def getItem(self, key: t.Any) -> Column:
|
sqlframe/base/functions.py
CHANGED
@@ -3930,13 +3930,16 @@ def last_value(col: ColumnOrName, ignoreNulls: t.Optional[t.Union[bool, Column]]
|
|
3930
3930
|
"""
|
3931
3931
|
session = _get_session()
|
3932
3932
|
|
3933
|
-
if session._is_duckdb:
|
3934
|
-
return last(col, ignoreNulls) # type: ignore
|
3935
|
-
|
3936
3933
|
column = Column.invoke_expression_over_column(col, expression.LastValue)
|
3937
3934
|
|
3938
3935
|
if ignoreNulls:
|
3939
|
-
|
3936
|
+
column = Column(expression.IgnoreNulls(this=column.column_expression))
|
3937
|
+
|
3938
|
+
if session._is_duckdb:
|
3939
|
+
agg_func = last(col, ignoreNulls) # type: ignore
|
3940
|
+
agg_func.expression._meta = agg_func.expression._meta or {}
|
3941
|
+
agg_func.expression._meta["window_func"] = column.expression
|
3942
|
+
return agg_func
|
3940
3943
|
return column
|
3941
3944
|
|
3942
3945
|
|
@@ -1,15 +1,15 @@
|
|
1
1
|
sqlframe/__init__.py,sha256=SB80yLTITBXHI2GCDS6n6bN5ObHqgPjfpRPAUwxaots,3403
|
2
|
-
sqlframe/_version.py,sha256=
|
2
|
+
sqlframe/_version.py,sha256=7cXV0iDbN83CKh1pJdAw2JSG9yI-8kW4wmTY23El-aE,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
|
6
6
|
sqlframe/base/catalog.py,sha256=ZuU_qmt4yjSoTYgecSGnOhitOdh3rJbGCUjnUBp5mlc,38564
|
7
|
-
sqlframe/base/column.py,sha256=
|
7
|
+
sqlframe/base/column.py,sha256=sp3fJstA49FslE2CcgvVFHyi7Jxsxk8qHTd-Z0cAEWc,19932
|
8
8
|
sqlframe/base/dataframe.py,sha256=D2N2Kvh_tiF60fYODUikq0xRCJYY4WB2aHbEcq5NIUo,84310
|
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=Bs1bwl25fN3Yy9rb4GnUWBGunQ1C_yelkb2yV9DSZIY,53918
|
12
|
-
sqlframe/base/functions.py,sha256=
|
12
|
+
sqlframe/base/functions.py,sha256=vi1ME9DYOeJHT26BM_3LjOzwq_x6Q-a8bv9wa6JIhYM,225029
|
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
|
@@ -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.31.
|
134
|
-
sqlframe-3.31.
|
135
|
-
sqlframe-3.31.
|
136
|
-
sqlframe-3.31.
|
137
|
-
sqlframe-3.31.
|
133
|
+
sqlframe-3.31.1.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
|
134
|
+
sqlframe-3.31.1.dist-info/METADATA,sha256=qyaYIcsC9vQHCx8KdaKUUN6hIYYKBTArtP8aENRG6UE,8987
|
135
|
+
sqlframe-3.31.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
136
|
+
sqlframe-3.31.1.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
|
137
|
+
sqlframe-3.31.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|