diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-09-20 09:22:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-09-20 09:22:25 +0000 |
commit | a45bbbb6f2fbd117d5d314e34e85afc2b48ad677 (patch) | |
tree | 35b576637338ae7cef217ddab721ad81aeb3f78c /sqlglot/dialects/presto.py | |
parent | Releasing debian version 18.4.1-1. (diff) | |
download | sqlglot-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.py | 3 |
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: |