1
0
Fork 0

Merging upstream version 23.12.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:32:41 +01:00
parent 1271e5fe1c
commit 740634a4e8
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
93 changed files with 55455 additions and 52777 deletions

View file

@ -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