bug(duckdb): StructColumns are compiled to untyped ROW, which aren't CAST correctly #10417
Open
1 task done
Labels
bug
Incorrect behavior inside of ibis
What happened?
I think the solution would be to add the explicit CAST to the StructColumn compilation, to match how the Literal is compiled? It obviously isn't always needed, based on how all tests are currently passing, but it appears to be context-dependent on where the val is getting used, and I think I would like to just remove any possibility of bugs, even if it sometimes more verbose than needed.
It also could be considered a bug in sqlglot, because in the sqlglot IR, there is enough info to see what the correct thing to do is:
eg is sqlglot's implementation for compiling Cast was really clever, they would see this reordering and fix it.
What version of ibis are you using?
main
What backend(s) are you using, if any?
duckdb, IDK if it is present in others.
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: