Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit d0bd81e

Browse files
committed
fix FLOAT type conversion in presto
1 parent 6e87b89 commit d0bd81e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sqeleton/databases/presto.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ def explain_as_text(self, query: str) -> str:
9393
return f"EXPLAIN (FORMAT TEXT) {query}"
9494

9595
def type_repr(self, t) -> str:
96+
if isinstance(t, TimestampTZ):
97+
return f"timestamp with time zone"
98+
9699
try:
97100
return {float: "REAL"}[t]
98101
except KeyError:
@@ -141,11 +144,6 @@ def set_timezone_to_utc(self) -> str:
141144
def current_timestamp(self) -> str:
142145
return "current_timestamp"
143146

144-
def type_repr(self, t) -> str:
145-
if isinstance(t, TimestampTZ):
146-
return f"timestamp with time zone"
147-
return super().type_repr(t)
148-
149147

150148
class Presto(Database):
151149
dialect = Dialect()

0 commit comments

Comments
 (0)