Skip to content

Commit

Permalink
fix(duckdb): ensure that the output type of round matches the Ibis-de…
Browse files Browse the repository at this point in the history
…clared API output type
  • Loading branch information
cpcloud committed Oct 22, 2024
1 parent 457fd10 commit 1d80baf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ibis/backends/sql/compilers/duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,5 +712,8 @@ def visit_TableUnnest(
def visit_StringToTime(self, op, *, arg, format_str):
return self.cast(self.f.str_to_time(arg, format_str), to=dt.time)

def visit_Round(self, op, *, arg, digits):
return self.cast(self.f.round(arg, digits or 0), op.dtype)


compiler = DuckDBCompiler()

0 comments on commit 1d80baf

Please sign in to comment.