From d1c57e9fc17709dac595c200456bddb13ba9a4ff Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 11:40:23 +0000 Subject: [PATCH 1/2] chore(deps): update mariadb docker tag to v11.7.2 --- compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index 11dca99fa2a7..f08114534bd5 100644 --- a/compose.yaml +++ b/compose.yaml @@ -31,7 +31,7 @@ services: - CMD - mariadb-admin - ping - image: mariadb:11.6.2 + image: mariadb:11.7.2 ports: - 3306:3306 networks: From 5b685bfdc1a7c34a29a343ab07877606b5655eed Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 18 Feb 2025 07:02:40 -0500 Subject: [PATCH 2/2] fix(mysql): explicitly handle the zero integer -> timestamp case --- ibis/backends/sql/compilers/mysql.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ibis/backends/sql/compilers/mysql.py b/ibis/backends/sql/compilers/mysql.py index d8f0c3262d13..910a7606717f 100644 --- a/ibis/backends/sql/compilers/mysql.py +++ b/ibis/backends/sql/compilers/mysql.py @@ -115,7 +115,11 @@ def visit_Cast(self, op, *, arg, to): # for TEXT (except when casting of course!) return arg elif from_.is_integer() and to.is_timestamp(): - return self.f.from_unixtime(arg) + return self.if_( + arg.eq(0), + self.f.timestamp("1970-01-01 00:00:00"), + self.f.from_unixtime(arg), + ) return super().visit_Cast(op, arg=arg, to=to) def visit_TimestampDiff(self, op, *, left, right):