sqlframe 3.9.3__py3-none-any.whl → 3.10.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 +2 -2
- sqlframe/base/function_alternatives.py +33 -0
- sqlframe/base/functions.py +1 -1
- sqlframe/base/session.py +2 -0
- sqlframe/bigquery/functions.py +1 -0
- sqlframe/duckdb/functions.py +1 -0
- sqlframe/duckdb/functions.pyi +1 -0
- sqlframe/postgres/functions.py +1 -0
- {sqlframe-3.9.3.dist-info → sqlframe-3.10.0.dist-info}/METADATA +5 -4
- {sqlframe-3.9.3.dist-info → sqlframe-3.10.0.dist-info}/RECORD +13 -13
- {sqlframe-3.9.3.dist-info → sqlframe-3.10.0.dist-info}/LICENSE +0 -0
- {sqlframe-3.9.3.dist-info → sqlframe-3.10.0.dist-info}/WHEEL +0 -0
- {sqlframe-3.9.3.dist-info → sqlframe-3.10.0.dist-info}/top_level.txt +0 -0
sqlframe/_version.py
CHANGED
|
@@ -64,6 +64,39 @@ def first_always_ignore_nulls(col: ColumnOrName, ignorenulls: t.Optional[bool] =
|
|
|
64
64
|
return first(col)
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
def to_timestamp_with_time_zone(col: ColumnOrName, format: t.Optional[str] = None) -> Column:
|
|
68
|
+
from sqlframe.base.session import _BaseSession
|
|
69
|
+
|
|
70
|
+
if format is not None:
|
|
71
|
+
return Column.invoke_expression_over_column(
|
|
72
|
+
col, expression.StrToTime, format=_BaseSession().format_time(format)
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
return Column.ensure_col(col).cast("timestamp with time zone", dialect="postgres")
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def to_timestamp_tz(col: ColumnOrName, format: t.Optional[str] = None) -> Column:
|
|
79
|
+
from sqlframe.base.session import _BaseSession
|
|
80
|
+
|
|
81
|
+
if format is not None:
|
|
82
|
+
return Column.invoke_expression_over_column(
|
|
83
|
+
col, expression.StrToTime, format=_BaseSession().format_time(format)
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
return Column.ensure_col(col).cast("timestamptz", dialect="duckdb")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def to_timestamp_just_timestamp(col: ColumnOrName, format: t.Optional[str] = None) -> Column:
|
|
90
|
+
from sqlframe.base.session import _BaseSession
|
|
91
|
+
|
|
92
|
+
if format is not None:
|
|
93
|
+
return Column.invoke_expression_over_column(
|
|
94
|
+
col, expression.StrToTime, format=_BaseSession().format_time(format)
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
return Column.ensure_col(col).cast("datetime", dialect="bigquery")
|
|
98
|
+
|
|
99
|
+
|
|
67
100
|
def bitwise_not_from_bitnot(col: ColumnOrName) -> Column:
|
|
68
101
|
return Column.invoke_anonymous_function(col, "BITNOT")
|
|
69
102
|
|
sqlframe/base/functions.py
CHANGED
|
@@ -900,7 +900,7 @@ def to_timestamp(col: ColumnOrName, format: t.Optional[str] = None) -> Column:
|
|
|
900
900
|
col, expression.StrToTime, format=_BaseSession().format_time(format)
|
|
901
901
|
)
|
|
902
902
|
|
|
903
|
-
return Column.ensure_col(col).cast("
|
|
903
|
+
return Column.ensure_col(col).cast("timestampltz")
|
|
904
904
|
|
|
905
905
|
|
|
906
906
|
@meta()
|
sqlframe/base/session.py
CHANGED
|
@@ -570,6 +570,8 @@ class _BaseSession(t.Generic[CATALOG, READER, WRITER, DF, CONN, UDF_REGISTRATION
|
|
|
570
570
|
return cls._to_row(list(value.keys()), list(value.values()))
|
|
571
571
|
elif isinstance(value, (list, set, tuple)) and value:
|
|
572
572
|
return [cls._to_value(x) for x in value]
|
|
573
|
+
elif isinstance(value, datetime.datetime):
|
|
574
|
+
return value.replace(tzinfo=None)
|
|
573
575
|
return value
|
|
574
576
|
|
|
575
577
|
@classmethod
|
sqlframe/bigquery/functions.py
CHANGED
sqlframe/duckdb/functions.py
CHANGED
sqlframe/duckdb/functions.pyi
CHANGED
|
@@ -29,6 +29,7 @@ from sqlframe.base.function_alternatives import ( # noqa
|
|
|
29
29
|
try_element_at_zero_based as try_element_at,
|
|
30
30
|
to_unix_timestamp_include_default_format as to_unix_timestamp,
|
|
31
31
|
regexp_replace_global_option as regexp_replace,
|
|
32
|
+
to_timestamp_tz as to_timestamp,
|
|
32
33
|
)
|
|
33
34
|
from sqlframe.base.functions import (
|
|
34
35
|
abs as abs,
|
sqlframe/postgres/functions.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sqlframe
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.10.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 @@ Requires-Python: >=3.8
|
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: prettytable (<3.12.1)
|
|
21
|
-
Requires-Dist: sqlglot (<
|
|
21
|
+
Requires-Dist: sqlglot (<26.1,>=24.0.0)
|
|
22
22
|
Requires-Dist: typing-extensions (<5,>=4.8)
|
|
23
23
|
Provides-Extra: bigquery
|
|
24
24
|
Requires-Dist: google-cloud-bigquery-storage (<3,>=2) ; extra == 'bigquery'
|
|
@@ -29,12 +29,13 @@ Provides-Extra: dev
|
|
|
29
29
|
Requires-Dist: duckdb (<1.2,>=0.9) ; extra == 'dev'
|
|
30
30
|
Requires-Dist: findspark (<3,>=2) ; extra == 'dev'
|
|
31
31
|
Requires-Dist: mypy (<1.14,>=1.10.0) ; extra == 'dev'
|
|
32
|
-
Requires-Dist: openai (<1.
|
|
32
|
+
Requires-Dist: openai (<1.58,>=1.30) ; extra == 'dev'
|
|
33
33
|
Requires-Dist: pandas-stubs (<3,>=2) ; extra == 'dev'
|
|
34
34
|
Requires-Dist: pandas (<3,>=2) ; extra == 'dev'
|
|
35
35
|
Requires-Dist: psycopg (<4,>=3.1) ; extra == 'dev'
|
|
36
36
|
Requires-Dist: pyarrow (<19,>=10) ; extra == 'dev'
|
|
37
37
|
Requires-Dist: pyspark (<3.6,>=2) ; extra == 'dev'
|
|
38
|
+
Requires-Dist: pytest-forked ; extra == 'dev'
|
|
38
39
|
Requires-Dist: pytest-postgresql (<7,>=6) ; extra == 'dev'
|
|
39
40
|
Requires-Dist: pytest-xdist (<3.7,>=3.6) ; extra == 'dev'
|
|
40
41
|
Requires-Dist: pytest (<8.4,>=8.2.0) ; extra == 'dev'
|
|
@@ -52,7 +53,7 @@ Provides-Extra: duckdb
|
|
|
52
53
|
Requires-Dist: duckdb (<1.2,>=0.9) ; extra == 'duckdb'
|
|
53
54
|
Requires-Dist: pandas (<3,>=2) ; extra == 'duckdb'
|
|
54
55
|
Provides-Extra: openai
|
|
55
|
-
Requires-Dist: openai (<1.
|
|
56
|
+
Requires-Dist: openai (<1.58,>=1.30) ; extra == 'openai'
|
|
56
57
|
Provides-Extra: pandas
|
|
57
58
|
Requires-Dist: pandas (<3,>=2) ; extra == 'pandas'
|
|
58
59
|
Provides-Extra: postgres
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlframe/__init__.py,sha256=wfqm98eLoLid9oV_FzzpG5loKC6LxOhj2lXpfN7SARo,3138
|
|
2
|
-
sqlframe/_version.py,sha256=
|
|
2
|
+
sqlframe/_version.py,sha256=yJvaXuGr5lNsckrWLDJU9y2z-5Kstgk4rjnewPxKvVA,413
|
|
3
3
|
sqlframe/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
sqlframe/base/_typing.py,sha256=b2clI5HI1zEZKB_3Msx3FeAJQyft44ubUifJwQRVXyQ,1298
|
|
5
5
|
sqlframe/base/catalog.py,sha256=SzFQalTWdhWzxUY-4ut1f9TfOECp_JmJEgNPfrRKCe0,38457
|
|
@@ -7,13 +7,13 @@ sqlframe/base/column.py,sha256=06fhVZ2nCn2QLxnfjdK-oYKeTFJC_smgSxu7u2UYlVg,17878
|
|
|
7
7
|
sqlframe/base/dataframe.py,sha256=ICW9eJElRsVIRutuu2aVJmP9k1n4oi6MfcLR0IrsBIs,74454
|
|
8
8
|
sqlframe/base/decorators.py,sha256=Jy4bf8MhZ-AJ6CWTj59bBJRqamtLbPC0USUMFrY6g0w,449
|
|
9
9
|
sqlframe/base/exceptions.py,sha256=9Uwvqn2eAkDpqm4BrRgbL61qM-GMCbJEMAW8otxO46s,370
|
|
10
|
-
sqlframe/base/function_alternatives.py,sha256=
|
|
11
|
-
sqlframe/base/functions.py,sha256=
|
|
10
|
+
sqlframe/base/function_alternatives.py,sha256=m7vH5I88H29hNIWyASl40JIaxxTsMHG8vVXD9DvdmVc,52142
|
|
11
|
+
sqlframe/base/functions.py,sha256=TyKLyn31bM7zo9qr9HMLNwO-zQVTQR4n9LpmHcBTlNg,190185
|
|
12
12
|
sqlframe/base/group.py,sha256=fsyG5990_Pd7gFPjTFrH9IEoAquL_wEkVpIlBAIkZJU,4091
|
|
13
13
|
sqlframe/base/normalize.py,sha256=nXAJ5CwxVf4DV0GsH-q1w0p8gmjSMlv96k_ez1eVul8,3880
|
|
14
14
|
sqlframe/base/operations.py,sha256=-AhNuEzcV7ZExoP1oY3blaKip-joQyJeQVvfBTs_2g4,3456
|
|
15
15
|
sqlframe/base/readerwriter.py,sha256=9cgOZuB3phZbQufY98JRDBVWRww3hsULc6Or1HK2Onk,26554
|
|
16
|
-
sqlframe/base/session.py,sha256=
|
|
16
|
+
sqlframe/base/session.py,sha256=nfyReCrEbX1YOzhaxJKeCg4Y9Trf9ONXGcrNSJUYudc,25353
|
|
17
17
|
sqlframe/base/transforms.py,sha256=y0j3SGDz3XCmNGrvassk1S-owllUWfkHyMgZlY6SFO4,467
|
|
18
18
|
sqlframe/base/types.py,sha256=iBNk9bpFtb2NBIogYS8i7OlQZMRvpR6XxqzBebsjQDU,12280
|
|
19
19
|
sqlframe/base/udf.py,sha256=O6hMhBUy9NVv-mhJRtfFhXTIa_-Z8Y_FkmmuOHu0l90,1117
|
|
@@ -27,7 +27,7 @@ sqlframe/bigquery/__init__.py,sha256=kbaomhYAANPdxeDQhajv8IHfMg_ENKivtYK-rPwaV08
|
|
|
27
27
|
sqlframe/bigquery/catalog.py,sha256=8d36IzT5GPWd1FdxJ9vEljOdbIDepHnFOBjwP0bX6FE,11625
|
|
28
28
|
sqlframe/bigquery/column.py,sha256=E1tUa62Y5HajkhgFuebU9zohrGyieudcHzTT8gfalio,40
|
|
29
29
|
sqlframe/bigquery/dataframe.py,sha256=Y2uy4FEYw0KxIHgnaA9uMwdIzxJzTlD_NSzIe7P7kxA,2405
|
|
30
|
-
sqlframe/bigquery/functions.py,sha256=
|
|
30
|
+
sqlframe/bigquery/functions.py,sha256=i3pvfBdpaYuox9Kk0QoT_v_RV1XZSfqnX6D7ra1HmSE,11189
|
|
31
31
|
sqlframe/bigquery/functions.pyi,sha256=GJnEmsTV2PyEzVlowJxpAvOT_6JYY2pVwJ_cZ3lxvz0,13636
|
|
32
32
|
sqlframe/bigquery/group.py,sha256=UVBNBRTo8OqS-_cS5YwvTeJYgYxeG-d6R3kfyHmlFqw,391
|
|
33
33
|
sqlframe/bigquery/readwriter.py,sha256=WAD3ZMwkkjOpvPPoZXfaLLNM6tRTeUvdEj-hQZAzXeo,870
|
|
@@ -51,8 +51,8 @@ sqlframe/duckdb/__init__.py,sha256=KAw_uZEhFMwi3D9Wj6AgHAKqLNk-EAx2uDIYu56oL44,8
|
|
|
51
51
|
sqlframe/duckdb/catalog.py,sha256=YYYVmetLUaJOdObKw4AJ7L0P-msshkta4xHlcZQ9zEA,4795
|
|
52
52
|
sqlframe/duckdb/column.py,sha256=E1tUa62Y5HajkhgFuebU9zohrGyieudcHzTT8gfalio,40
|
|
53
53
|
sqlframe/duckdb/dataframe.py,sha256=HZg_uMAz4RsubZJT4-MslUQS_0-InF0_P5Yq5HyJ3wE,1708
|
|
54
|
-
sqlframe/duckdb/functions.py,sha256=
|
|
55
|
-
sqlframe/duckdb/functions.pyi,sha256=
|
|
54
|
+
sqlframe/duckdb/functions.py,sha256=auBbRCgnzL74wv_aIsCnRbIAS3pAn4M_QLAaFE_-4tY,1957
|
|
55
|
+
sqlframe/duckdb/functions.pyi,sha256=RH7m6rgiCrXwsmV5SrKeP4KC7V8wVPnuW3_rdeWJLOY,5916
|
|
56
56
|
sqlframe/duckdb/group.py,sha256=IkhbW42Ng1U5YT3FkIdiB4zBqRkW4QyTb-1detY1e_4,383
|
|
57
57
|
sqlframe/duckdb/readwriter.py,sha256=6nGnz2SE-tpuPDQXPI23SQQXRre_raUG5cou3s3NrpA,4859
|
|
58
58
|
sqlframe/duckdb/session.py,sha256=b5IrKbTkYUVNQGSG2EJPNV9MTdJw4onN-9aMrskjxck,2721
|
|
@@ -63,7 +63,7 @@ sqlframe/postgres/__init__.py,sha256=NN9WI0-GehvpPdJmTB2VSDVpA5PAtxa3ZkF4BRcTEy4
|
|
|
63
63
|
sqlframe/postgres/catalog.py,sha256=9XVXXDW04mY_KmeB52NsCny8n0evqdDCBxhGH1Xce6s,8956
|
|
64
64
|
sqlframe/postgres/column.py,sha256=E1tUa62Y5HajkhgFuebU9zohrGyieudcHzTT8gfalio,40
|
|
65
65
|
sqlframe/postgres/dataframe.py,sha256=f-w6UHxZtmeZ5oMbaqJaZ8FrYeOhzyveNlZOK57ke0k,1289
|
|
66
|
-
sqlframe/postgres/functions.py,sha256=
|
|
66
|
+
sqlframe/postgres/functions.py,sha256=InfSS79gvytVSH8l_qgz1QHY2eod17aWVhtDYxfJjDs,2685
|
|
67
67
|
sqlframe/postgres/functions.pyi,sha256=9s7W5QPZXPKqxY6XpkxLCHmC5sp1PkJg1LywgpWTz-k,5550
|
|
68
68
|
sqlframe/postgres/group.py,sha256=KUXeSFKWTSH9yCRJAhW85OvjZaG6Zr4In9LR_ie3yGU,391
|
|
69
69
|
sqlframe/postgres/readwriter.py,sha256=L1e3yKXzFVNR_W5s1DHaWol7G8x7l4jcZ5sLGualyMk,870
|
|
@@ -119,8 +119,8 @@ sqlframe/standalone/udf.py,sha256=azmgtUjHNIPs0WMVNId05SHwiYn41MKVBhKXsQJ5dmY,27
|
|
|
119
119
|
sqlframe/standalone/window.py,sha256=6GKPzuxeSapJakBaKBeT9VpED1ACdjggDv9JRILDyV0,35
|
|
120
120
|
sqlframe/testing/__init__.py,sha256=VVCosQhitU74A3NnE52O4mNtGZONapuEXcc20QmSlnQ,132
|
|
121
121
|
sqlframe/testing/utils.py,sha256=9DDYVuocO7tygee3RaajuJNZ24sJwf_LY556kKg7kTw,13011
|
|
122
|
-
sqlframe-3.
|
|
123
|
-
sqlframe-3.
|
|
124
|
-
sqlframe-3.
|
|
125
|
-
sqlframe-3.
|
|
126
|
-
sqlframe-3.
|
|
122
|
+
sqlframe-3.10.0.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
|
|
123
|
+
sqlframe-3.10.0.dist-info/METADATA,sha256=ShESxtRt3wEn5TaieppcTbb9mvlqKpdog8KTJOxPnWU,9188
|
|
124
|
+
sqlframe-3.10.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
125
|
+
sqlframe-3.10.0.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
|
|
126
|
+
sqlframe-3.10.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|