ibis icon indicating copy to clipboard operation
ibis copied to clipboard

bug: chained casts are incorrectly merged

Open NickCrews opened this issue 1 year ago • 0 comments

What happened?

import ibis

ibis.memtable({"x": [1.2, 3.4]}).x.round().cast(int).cast(str).execute().to_list()
# gives
# ['1.0', '3.0']
# I expect
# ['1', '3']

# not a problem with literals?
ibis.literal(1.2).round().cast(int).cast(str).execute()
# '1'

What version of ibis are you using?

main

What backend(s) are you using, if any?

duckdb

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

NickCrews avatar Oct 01 '24 22:10 NickCrews