Merging upstream version 25.32.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
160ab5bf81
commit
02152e9ba6
74 changed files with 2284 additions and 1814 deletions
|
@ -145,6 +145,8 @@ def _remove_ts_or_ds_to_date(
|
|||
|
||||
|
||||
class MySQL(Dialect):
|
||||
PROMOTE_TO_INFERRED_DATETIME_TYPE = True
|
||||
|
||||
# https://dev.mysql.com/doc/refman/8.0/en/identifiers.html
|
||||
IDENTIFIERS_CAN_START_WITH_DIGIT = True
|
||||
|
||||
|
@ -292,6 +294,8 @@ class MySQL(Dialect):
|
|||
|
||||
FUNCTIONS = {
|
||||
**parser.Parser.FUNCTIONS,
|
||||
"CHAR_LENGTH": exp.Length.from_arg_list,
|
||||
"CHARACTER_LENGTH": exp.Length.from_arg_list,
|
||||
"CONVERT_TZ": lambda args: exp.ConvertTimezone(
|
||||
source_tz=seq_get(args, 1), target_tz=seq_get(args, 2), timestamp=seq_get(args, 0)
|
||||
),
|
||||
|
@ -725,6 +729,7 @@ class MySQL(Dialect):
|
|||
e: f"""GROUP_CONCAT({self.sql(e, "this")} SEPARATOR {self.sql(e, "separator") or "','"})""",
|
||||
exp.ILike: no_ilike_sql,
|
||||
exp.JSONExtractScalar: arrow_json_extract_sql,
|
||||
exp.Length: rename_func("CHAR_LENGTH"),
|
||||
exp.Max: max_or_greatest,
|
||||
exp.Min: min_or_least,
|
||||
exp.Month: _remove_ts_or_ds_to_date(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue