From 7ff5bab54e3298dd89132706f6adee17f5164f6d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 5 Nov 2022 19:41:12 +0100 Subject: Merging upstream version 9.0.6. Signed-off-by: Daniel Baumann --- sqlglot/dialects/hive.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sqlglot/dialects/hive.py') diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py index 63fdb85..03049ff 100644 --- a/sqlglot/dialects/hive.py +++ b/sqlglot/dialects/hive.py @@ -111,6 +111,7 @@ def _unnest_to_explode_sql(self, expression): self.sql( exp.Lateral( this=udtf(this=expression), + view=True, alias=exp.TableAlias(this=alias.this, columns=[column]), ) ) @@ -283,6 +284,7 @@ class Hive(Dialect): exp.UnixToTime: rename_func("FROM_UNIXTIME"), exp.UnixToTimeStr: rename_func("FROM_UNIXTIME"), exp.PartitionedByProperty: lambda self, e: f"PARTITIONED BY {self.sql(e, 'value')}", + exp.NumberToStr: rename_func("FORMAT_NUMBER"), } WITH_PROPERTIES = {exp.AnonymousProperty} -- cgit v1.2.3