Closed pcapel closed 9 months ago
I see that the linked function is for the rename
which is acting against all columns. The reproduction would use the other clause, which is where the check would need to happen. Thinking something similar to maybe_raise_column_not_found
?
I agree we should validate before we pass off to Polars.
EDIT: No I was wrong about there maybe being a bug.
Overview
It's a nit pick, but a NIF panic is a surprising error when a key is duplicated in the
DataFrame.rename
function. A more descriptive error would make a lot of sense.It looks like there already some validation where this could fit in, happy to add support if this is deemed worthwhile.
Minimal reproduction via the livebook below.
Reproduce Panic
Section