sqlframe 3.40.1__py3-none-any.whl → 3.41.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 +3 -3
- sqlframe/base/functions.py +9 -1
- sqlframe/base/readerwriter.py +10 -7
- {sqlframe-3.40.1.dist-info → sqlframe-3.41.0.dist-info}/METADATA +4 -4
- {sqlframe-3.40.1.dist-info → sqlframe-3.41.0.dist-info}/RECORD +8 -8
- {sqlframe-3.40.1.dist-info → sqlframe-3.41.0.dist-info}/LICENSE +0 -0
- {sqlframe-3.40.1.dist-info → sqlframe-3.41.0.dist-info}/WHEEL +0 -0
- {sqlframe-3.40.1.dist-info → sqlframe-3.41.0.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.
|
32
|
-
__version_tuple__ = version_tuple = (3,
|
31
|
+
__version__ = version = '3.41.0'
|
32
|
+
__version_tuple__ = version_tuple = (3, 41, 0)
|
33
33
|
|
34
|
-
__commit_id__ = commit_id = '
|
34
|
+
__commit_id__ = commit_id = 'g961d3fda2'
|
sqlframe/base/functions.py
CHANGED
@@ -2133,6 +2133,11 @@ def bit_xor(col: ColumnOrName) -> Column:
|
|
2133
2133
|
|
2134
2134
|
@meta(unsupported_engines=["postgres", "snowflake"])
|
2135
2135
|
def bit_count(col: ColumnOrName) -> Column:
|
2136
|
+
session = _get_session()
|
2137
|
+
|
2138
|
+
if session._is_duckdb:
|
2139
|
+
return Column.invoke_anonymous_function(col, "BIT_COUNT")
|
2140
|
+
|
2136
2141
|
return Column.invoke_expression_over_column(col, expression.BitwiseCountAgg)
|
2137
2142
|
|
2138
2143
|
|
@@ -5216,7 +5221,7 @@ def regexp_count(str: ColumnOrName, regexp: ColumnOrName) -> Column:
|
|
5216
5221
|
return Column.invoke_anonymous_function(str, "regexp_count", regexp)
|
5217
5222
|
|
5218
5223
|
|
5219
|
-
@meta(unsupported_engines="
|
5224
|
+
@meta(unsupported_engines=["bigquery", "postgres"])
|
5220
5225
|
def regexp_extract_all(
|
5221
5226
|
str: ColumnOrName, regexp: ColumnOrName, idx: t.Optional[t.Union[int, Column]] = None
|
5222
5227
|
) -> Column:
|
@@ -5251,6 +5256,9 @@ def regexp_extract_all(
|
|
5251
5256
|
>>> df.select(regexp_extract_all('str', col("regexp")).alias('d')).collect()
|
5252
5257
|
[Row(d=['100', '300'])]
|
5253
5258
|
"""
|
5259
|
+
if idx is None:
|
5260
|
+
idx = 1
|
5261
|
+
|
5254
5262
|
return Column.invoke_expression_over_column(
|
5255
5263
|
str, expression.RegexpExtractAll, expression=regexp, group=idx
|
5256
5264
|
)
|
sqlframe/base/readerwriter.py
CHANGED
@@ -61,14 +61,17 @@ class _BaseDataFrameReader(t.Generic[SESSION, DF, TABLE]):
|
|
61
61
|
def _to_casted_columns(self, column_mapping: t.Dict) -> t.List[Column]:
|
62
62
|
from sqlframe.base.column import Column
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
64
|
+
results = []
|
65
|
+
for k, v in column_mapping.items():
|
66
|
+
column = exp.to_column(k, dialect=self.session.input_dialect)
|
67
|
+
results.append(
|
68
|
+
Column(
|
69
|
+
exp.cast(
|
70
|
+
column, to=exp.DataType.build(v, dialect=self.session.input_dialect)
|
71
|
+
).as_(column.this)
|
72
|
+
)
|
69
73
|
)
|
70
|
-
|
71
|
-
]
|
74
|
+
return results
|
72
75
|
|
73
76
|
def format(self, source: str) -> "Self":
|
74
77
|
"""Specifies the input data source format.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sqlframe
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.41.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
|
@@ -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.15,>=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'
|
@@ -28,7 +28,7 @@ Requires-Dist: databricks-sql-connector[pyarrow] <5,>=3.6 ; extra == 'databricks
|
|
28
28
|
Provides-Extra: dev
|
29
29
|
Requires-Dist: duckdb <1.4,>=1.2 ; extra == 'dev'
|
30
30
|
Requires-Dist: findspark <3,>=2 ; extra == 'dev'
|
31
|
-
Requires-Dist: mypy <1.
|
31
|
+
Requires-Dist: mypy <1.19,>=1.10.0 ; extra == 'dev'
|
32
32
|
Requires-Dist: openai <2,>=1.30 ; extra == 'dev'
|
33
33
|
Requires-Dist: pandas-stubs <3,>=2 ; extra == 'dev'
|
34
34
|
Requires-Dist: pandas <3,>=2 ; extra == 'dev'
|
@@ -41,7 +41,7 @@ Requires-Dist: pytest-postgresql <8,>=6 ; extra == 'dev'
|
|
41
41
|
Requires-Dist: pytest-rerunfailures ; extra == 'dev'
|
42
42
|
Requires-Dist: pytest-xdist <3.9,>=3.6 ; extra == 'dev'
|
43
43
|
Requires-Dist: pytest <8.5,>=8.2.0 ; extra == 'dev'
|
44
|
-
Requires-Dist: ruff <0.
|
44
|
+
Requires-Dist: ruff <0.14,>=0.4.4 ; extra == 'dev'
|
45
45
|
Requires-Dist: types-psycopg2 <3,>=2.9 ; extra == 'dev'
|
46
46
|
Provides-Extra: docs
|
47
47
|
Requires-Dist: mkdocs-include-markdown-plugin ==6.0.6 ; extra == 'docs'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
sqlframe/__init__.py,sha256=SB80yLTITBXHI2GCDS6n6bN5ObHqgPjfpRPAUwxaots,3403
|
2
|
-
sqlframe/_version.py,sha256=
|
2
|
+
sqlframe/_version.py,sha256=dgLbChf8wsQ5H9o1FXadKfn_qB0pcaOHICUJO8Rhj6U,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,11 +9,11 @@ sqlframe/base/dataframe.py,sha256=Kl3WycARIWBBIze0enmZDGkfOt65mZDQ2hx_6pxRsxI,87
|
|
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=vlPGxKlgU1oFmXD8WDClpZlDvvC4L4q5qJs4qrG9xjw,228101
|
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
|
16
|
-
sqlframe/base/readerwriter.py,sha256=
|
16
|
+
sqlframe/base/readerwriter.py,sha256=b1CZgOZv-8h0sC3PWqPVAwAwlDMjpmRys6FGhugKspU,31391
|
17
17
|
sqlframe/base/session.py,sha256=99X-ShK9ohHCX6WdIJs0HhjfK23snaE3Gv6RYc5wqUI,27687
|
18
18
|
sqlframe/base/table.py,sha256=rCeh1W5SWbtEVfkLAUiexzrZwNgmZeptLEmLcM1ABkE,6961
|
19
19
|
sqlframe/base/transforms.py,sha256=y0j3SGDz3XCmNGrvassk1S-owllUWfkHyMgZlY6SFO4,467
|
@@ -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.
|
134
|
-
sqlframe-3.
|
135
|
-
sqlframe-3.
|
136
|
-
sqlframe-3.
|
137
|
-
sqlframe-3.
|
133
|
+
sqlframe-3.41.0.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
|
134
|
+
sqlframe-3.41.0.dist-info/METADATA,sha256=O8Y62mZw3zncgCc6RWb8i4_zHyeNySrjl6AeQV_tflc,9070
|
135
|
+
sqlframe-3.41.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
136
|
+
sqlframe-3.41.0.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
|
137
|
+
sqlframe-3.41.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|