sqlframe 3.8.1__py3-none-any.whl → 3.8.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/util.py +10 -0
- {sqlframe-3.8.1.dist-info → sqlframe-3.8.2.dist-info}/METADATA +1 -1
- {sqlframe-3.8.1.dist-info → sqlframe-3.8.2.dist-info}/RECORD +7 -7
- {sqlframe-3.8.1.dist-info → sqlframe-3.8.2.dist-info}/LICENSE +0 -0
- {sqlframe-3.8.1.dist-info → sqlframe-3.8.2.dist-info}/WHEEL +0 -0
- {sqlframe-3.8.1.dist-info → sqlframe-3.8.2.dist-info}/top_level.txt +0 -0
sqlframe/_version.py
CHANGED
sqlframe/base/util.py
CHANGED
|
@@ -6,6 +6,7 @@ import unicodedata
|
|
|
6
6
|
|
|
7
7
|
from sqlglot import expressions as exp
|
|
8
8
|
from sqlglot import parse_one, to_table
|
|
9
|
+
from sqlglot.dialects import DuckDB
|
|
9
10
|
from sqlglot.dialects.dialect import Dialect, DialectType
|
|
10
11
|
from sqlglot.optimizer.normalize_identifiers import normalize_identifiers
|
|
11
12
|
from sqlglot.optimizer.qualify_columns import (
|
|
@@ -372,6 +373,12 @@ def normalize_string(
|
|
|
372
373
|
) -> str:
|
|
373
374
|
from sqlframe.base.session import _BaseSession
|
|
374
375
|
|
|
376
|
+
data_type_replacement_mapping = {
|
|
377
|
+
DuckDB: {
|
|
378
|
+
"TIMESTAMP_NS": "TIMESTAMP",
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
375
382
|
session: _BaseSession = _BaseSession()
|
|
376
383
|
|
|
377
384
|
str_to_dialect = {
|
|
@@ -397,6 +404,9 @@ def normalize_string(
|
|
|
397
404
|
elif is_table:
|
|
398
405
|
value_expression = to_table(value_without_star, dialect=from_dialect)
|
|
399
406
|
elif is_datatype:
|
|
407
|
+
value_without_star = data_type_replacement_mapping.get(from_dialect, {}).get( # type: ignore
|
|
408
|
+
value_without_star, value_without_star
|
|
409
|
+
)
|
|
400
410
|
value_expression = exp.DataType.build(value_without_star, dialect=from_dialect)
|
|
401
411
|
elif is_column:
|
|
402
412
|
value_expression = exp.to_column(value_without_star, dialect=from_dialect)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlframe/__init__.py,sha256=E3qCJ4PSEgKz6Hg3ves6LWt3JrQOV8c9HVLSIUOzKNc,3106
|
|
2
|
-
sqlframe/_version.py,sha256=
|
|
2
|
+
sqlframe/_version.py,sha256=bV13UGjgKKBESjgpeQicXd0eKXwIF_qqxftysbl4rqs,411
|
|
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
|
|
@@ -17,7 +17,7 @@ sqlframe/base/session.py,sha256=6vQ2bJa357J1bycx1vMxkIUdcA2YbMIYq956bpytztI,2525
|
|
|
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
|
|
20
|
-
sqlframe/base/util.py,sha256=
|
|
20
|
+
sqlframe/base/util.py,sha256=ggiGdegJ-Re-xk6PLB5tt6yAW9S7pg3xsrFm0xU3XCc,15233
|
|
21
21
|
sqlframe/base/window.py,sha256=8hOv-ignPPIsZA9FzvYzcLE9J_glalVaYjIAUdRUX3o,4943
|
|
22
22
|
sqlframe/base/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
sqlframe/base/mixins/catalog_mixins.py,sha256=9tn0mK8oPoqIIjNItystD5tdBMdK9YpkxTG7G9KQl8k,18619
|
|
@@ -107,8 +107,8 @@ sqlframe/standalone/udf.py,sha256=azmgtUjHNIPs0WMVNId05SHwiYn41MKVBhKXsQJ5dmY,27
|
|
|
107
107
|
sqlframe/standalone/window.py,sha256=6GKPzuxeSapJakBaKBeT9VpED1ACdjggDv9JRILDyV0,35
|
|
108
108
|
sqlframe/testing/__init__.py,sha256=VVCosQhitU74A3NnE52O4mNtGZONapuEXcc20QmSlnQ,132
|
|
109
109
|
sqlframe/testing/utils.py,sha256=9DDYVuocO7tygee3RaajuJNZ24sJwf_LY556kKg7kTw,13011
|
|
110
|
-
sqlframe-3.8.
|
|
111
|
-
sqlframe-3.8.
|
|
112
|
-
sqlframe-3.8.
|
|
113
|
-
sqlframe-3.8.
|
|
114
|
-
sqlframe-3.8.
|
|
110
|
+
sqlframe-3.8.2.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
|
|
111
|
+
sqlframe-3.8.2.dist-info/METADATA,sha256=h-5QphoAVwjsAkYc7nS9tHBxFDLHxWDmHKcCNGqN89A,8639
|
|
112
|
+
sqlframe-3.8.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
113
|
+
sqlframe-3.8.2.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
|
|
114
|
+
sqlframe-3.8.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|