aroig commented on issue #17285: URL: https://github.com/apache/datafusion/issues/17285#issuecomment-3223504330
> Are you using ColumnarValue::cast_to, by any chance? I am using `logical_expr::cast`, as in [here](https://github.com/aroig/datafusion-cast-bug/blob/8ab60e2777eb8945c322b62b7ea14d1927eb63a0/src/main.rs#L57). Not sure if that uses `ColumnarValue::cast_to` underneath. For context, I came to this as a user of delta-rs. [This](https://github.com/delta-io/delta-rs/issues/3694) is the original problem we had. After some digging, it seemed the unexpected behaviour was propagated from datafusion. So, it appears `logical_expr::cast` does cast structs positionally, is this the intended behaviour? Is there functionality available to cast structs in a safer way (by field name, not positionally?). Casting positionally was surprising and unexpected behaviour for us, which lead to silent data corruption. Thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org