summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/presto.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlglot/dialects/presto.py')
-rw-r--r--sqlglot/dialects/presto.py61
1 files changed, 61 insertions, 0 deletions
diff --git a/sqlglot/dialects/presto.py b/sqlglot/dialects/presto.py
index 6c23bdf..1f02831 100644
--- a/sqlglot/dialects/presto.py
+++ b/sqlglot/dialects/presto.py
@@ -443,6 +443,67 @@ class Presto(Dialect):
exp.Xor: bool_xor_sql,
}
+ RESERVED_KEYWORDS = {
+ "alter",
+ "and",
+ "as",
+ "between",
+ "by",
+ "case",
+ "cast",
+ "constraint",
+ "create",
+ "cross",
+ "current_time",
+ "current_timestamp",
+ "deallocate",
+ "delete",
+ "describe",
+ "distinct",
+ "drop",
+ "else",
+ "end",
+ "escape",
+ "except",
+ "execute",
+ "exists",
+ "extract",
+ "false",
+ "for",
+ "from",
+ "full",
+ "group",
+ "having",
+ "in",
+ "inner",
+ "insert",
+ "intersect",
+ "into",
+ "is",
+ "join",
+ "left",
+ "like",
+ "natural",
+ "not",
+ "null",
+ "on",
+ "or",
+ "order",
+ "outer",
+ "prepare",
+ "right",
+ "select",
+ "table",
+ "then",
+ "true",
+ "union",
+ "using",
+ "values",
+ "when",
+ "where",
+ "with",
+ }
+
def strtounix_sql(self, expression: exp.StrToUnix) -> str:
# Since `TO_UNIXTIME` requires a `TIMESTAMP`, we need to parse the argument into one.
# To do this, we first try to `DATE_PARSE` it, but since this can fail when there's a