summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/presto.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sqlglot/dialects/presto.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sqlglot/dialects/presto.py b/sqlglot/dialects/presto.py
index 4b54e95..9ae4c32 100644
--- a/sqlglot/dialects/presto.py
+++ b/sqlglot/dialects/presto.py
@@ -237,6 +237,7 @@ class Presto(Dialect):
this=seq_get(args, 0), charset=exp.Literal.string("utf-8")
),
}
+
FUNCTION_PARSERS = parser.Parser.FUNCTION_PARSERS.copy()
FUNCTION_PARSERS.pop("TRIM")
@@ -310,6 +311,7 @@ class Presto(Dialect):
exp.If: if_sql,
exp.ILike: no_ilike_sql,
exp.Initcap: _initcap_sql,
+ exp.ParseJSON: rename_func("JSON_PARSE"),
exp.Last: _first_last_sql,
exp.Lateral: _explode_to_unnest_sql,
exp.Left: left_to_substring_sql,
@@ -360,6 +362,7 @@ class Presto(Dialect):
exp.WithinGroup: transforms.preprocess(
[transforms.remove_within_group_for_percentiles]
),
+ exp.Timestamp: transforms.preprocess([transforms.timestamp_to_cast]),
}
def interval_sql(self, expression: exp.Interval) -> str: