summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/presto.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-20 09:22:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-20 09:22:25 +0000
commita45bbbb6f2fbd117d5d314e34e85afc2b48ad677 (patch)
tree35b576637338ae7cef217ddab721ad81aeb3f78c /sqlglot/dialects/presto.py
parentReleasing debian version 18.4.1-1. (diff)
downloadsqlglot-a45bbbb6f2fbd117d5d314e34e85afc2b48ad677.tar.xz
sqlglot-a45bbbb6f2fbd117d5d314e34e85afc2b48ad677.zip
Merging upstream version 18.5.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/presto.py')
-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: