Skip to content

Commit

Permalink
fix(flink): give true division semantics to flink division operation
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Oct 24, 2024
1 parent d458138 commit 1dfbea0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ibis/backends/sql/compilers/flink.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1dfbea0

Please sign in to comment.