summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/hive.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-06 07:48:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-06 07:48:11 +0000
commit379c6d1f52e1d311867c4f789dc389da1d9af898 (patch)
treec9ca62eb7b8b7e861cc67248850db220ad0881c9 /sqlglot/dialects/hive.py
parentReleasing debian version 17.7.0-1. (diff)
downloadsqlglot-379c6d1f52e1d311867c4f789dc389da1d9af898.tar.xz
sqlglot-379c6d1f52e1d311867c4f789dc389da1d9af898.zip
Merging upstream version 17.9.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/hive.py')
-rw-r--r--sqlglot/dialects/hive.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py
index e131434..4e84085 100644
--- a/sqlglot/dialects/hive.py
+++ b/sqlglot/dialects/hive.py
@@ -359,14 +359,16 @@ class Hive(Dialect):
TABLE_HINTS = False
QUERY_HINTS = False
INDEX_ON = "ON TABLE"
+ EXTRACT_ALLOWS_QUOTES = False
TYPE_MAPPING = {
**generator.Generator.TYPE_MAPPING,
- exp.DataType.Type.TEXT: "STRING",
+ exp.DataType.Type.BIT: "BOOLEAN",
exp.DataType.Type.DATETIME: "TIMESTAMP",
- exp.DataType.Type.VARBINARY: "BINARY",
+ exp.DataType.Type.TEXT: "STRING",
+ exp.DataType.Type.TIME: "TIMESTAMP",
exp.DataType.Type.TIMESTAMPTZ: "TIMESTAMP",
- exp.DataType.Type.BIT: "BOOLEAN",
+ exp.DataType.Type.VARBINARY: "BINARY",
}
TRANSFORMS = {
@@ -396,6 +398,7 @@ class Hive(Dialect):
exp.FromBase64: rename_func("UNBASE64"),
exp.If: if_sql,
exp.ILike: no_ilike_sql,
+ exp.IsNan: rename_func("ISNAN"),
exp.JSONExtract: rename_func("GET_JSON_OBJECT"),
exp.JSONExtractScalar: rename_func("GET_JSON_OBJECT"),
exp.JSONFormat: _json_format_sql,