From 1dfbea0dea80d29743883ffad0ba5fd78a9f99f8 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:50:35 -0400 Subject: [PATCH] fix(flink): give true division semantics to flink division operation --- ibis/backends/sql/compilers/flink.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ibis/backends/sql/compilers/flink.py b/ibis/backends/sql/compilers/flink.py index 10a3b3db09473..f14fd678b85b6 100644 --- a/ibis/backends/sql/compilers/flink.py +++ b/ibis/backends/sql/compilers/flink.py @@ -329,6 +329,10 @@ def visit_TryCast(self, op, *, arg, to): ) return sge.TryCast(this=arg, to=type_mapper.from_ibis(to)) + def visit_Divide(self, op, *, left, right): + dtype = op.dtype + return self.cast(left, dtype) / self.cast(right, dtype) + def visit_FloorDivide(self, op, *, left, right): return self.f.floor(left / right)