diff options
Diffstat (limited to 'sqlglot/dialects/trino.py')
-rw-r--r-- | sqlglot/dialects/trino.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sqlglot/dialects/trino.py b/sqlglot/dialects/trino.py index eddb70a..1bbed67 100644 --- a/sqlglot/dialects/trino.py +++ b/sqlglot/dialects/trino.py @@ -11,9 +11,16 @@ class Trino(Presto): class Generator(Presto.Generator): TRANSFORMS = { **Presto.Generator.TRANSFORMS, - exp.ArraySum: lambda self, e: f"REDUCE({self.sql(e, 'this')}, 0, (acc, x) -> acc + x, acc -> acc)", + exp.ArraySum: lambda self, + e: f"REDUCE({self.sql(e, 'this')}, 0, (acc, x) -> acc + x, acc -> acc)", exp.Merge: merge_without_target_sql, } + SUPPORTED_JSON_PATH_PARTS = { + exp.JSONPathKey, + exp.JSONPathRoot, + exp.JSONPathSubscript, + } + class Tokenizer(Presto.Tokenizer): HEX_STRINGS = [("X'", "'")] |