sqlframe 3.38.1__py3-none-any.whl → 3.38.2__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/functions.py +8 -0
- {sqlframe-3.38.1.dist-info → sqlframe-3.38.2.dist-info}/METADATA +1 -1
- {sqlframe-3.38.1.dist-info → sqlframe-3.38.2.dist-info}/RECORD +7 -7
- {sqlframe-3.38.1.dist-info → sqlframe-3.38.2.dist-info}/LICENSE +0 -0
- {sqlframe-3.38.1.dist-info → sqlframe-3.38.2.dist-info}/WHEEL +0 -0
- {sqlframe-3.38.1.dist-info → sqlframe-3.38.2.dist-info}/top_level.txt +0 -0
sqlframe/_version.py
CHANGED
sqlframe/base/functions.py
CHANGED
@@ -2318,6 +2318,14 @@ def array_distinct(col: ColumnOrName) -> Column:
|
|
2318
2318
|
if session._is_bigquery:
|
2319
2319
|
return array_distinct_bgutil(col)
|
2320
2320
|
|
2321
|
+
if session._is_duckdb:
|
2322
|
+
# DuckDB's array_distinct removes nulls, but we need to preserve them
|
2323
|
+
# Check if original array contains null and append it back if needed
|
2324
|
+
original_col = Column.ensure_col(col)
|
2325
|
+
distinct_result = Column.invoke_anonymous_function(col, "ARRAY_DISTINCT")
|
2326
|
+
has_null = array_position(original_col, lit(None)) > lit(0)
|
2327
|
+
return when(has_null, array_append(distinct_result, lit(None))).otherwise(distinct_result)
|
2328
|
+
|
2321
2329
|
return Column.invoke_anonymous_function(col, "ARRAY_DISTINCT")
|
2322
2330
|
|
2323
2331
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
sqlframe/__init__.py,sha256=SB80yLTITBXHI2GCDS6n6bN5ObHqgPjfpRPAUwxaots,3403
|
2
|
-
sqlframe/_version.py,sha256=
|
2
|
+
sqlframe/_version.py,sha256=_jX_R7_H72gqRQJCQLfuj94JZgcTBOsYXYFp5ayxiUI,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
|
@@ -9,7 +9,7 @@ sqlframe/base/dataframe.py,sha256=0diYONDlet8iZt49LC3vcmfXHAAZ2MovPL2pTXYHj2U,85
|
|
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=eV0QjTvDKAArIKSMByXkGJalQtjzGVqO8-8vjQWtMvE,227677
|
13
13
|
sqlframe/base/group.py,sha256=fBm8EUve7W7xz11nybTXr09ih-yZxL_vvEiZVE1eb_0,12025
|
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.38.
|
134
|
-
sqlframe-3.38.
|
135
|
-
sqlframe-3.38.
|
136
|
-
sqlframe-3.38.
|
137
|
-
sqlframe-3.38.
|
133
|
+
sqlframe-3.38.2.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
|
134
|
+
sqlframe-3.38.2.dist-info/METADATA,sha256=qHIvP28L4dPTMhTjSR150ZzGfGLxUZ7YZmStZUbasg8,9039
|
135
|
+
sqlframe-3.38.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
136
|
+
sqlframe-3.38.2.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
|
137
|
+
sqlframe-3.38.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|