From 7457677bc603569692329e39a59ccb018306e2a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 12 Mar 2023 11:17:16 +0100 Subject: Merging upstream version 11.3.6. Signed-off-by: Daniel Baumann --- sqlglot/dialects/mysql.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sqlglot/dialects/mysql.py') diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py index 3531f59..a831235 100644 --- a/sqlglot/dialects/mysql.py +++ b/sqlglot/dialects/mysql.py @@ -301,8 +301,6 @@ class MySQL(Dialect): "READ ONLY", } - INTEGER_DIVISION = False - def _parse_show_mysql(self, this, target=False, full=None, global_=None): if target: if isinstance(target, str): @@ -435,7 +433,6 @@ class MySQL(Dialect): class Generator(generator.Generator): LOCKING_READS_SUPPORTED = True NULL_ORDERING_SUPPORTED = False - INTEGER_DIVISION = False TRANSFORMS = { **generator.Generator.TRANSFORMS, # type: ignore @@ -446,6 +443,7 @@ class MySQL(Dialect): exp.TableSample: no_tablesample_sql, exp.TryCast: no_trycast_sql, exp.DateAdd: _date_add_sql("ADD"), + exp.DateDiff: lambda self, e: f"DATEDIFF({self.format_args(e.this, e.expression)})", exp.DateSub: _date_add_sql("SUB"), exp.DateTrunc: _date_trunc_sql, exp.DayOfWeek: rename_func("DAYOFWEEK"), -- cgit v1.2.3