Closed cheikhachraf closed 4 months ago
Thanks for working on this!
One thing I think would be helpful would be to add a full roundtrip test to verify that Substrait inputs with user-defined type literals can go from PROTO -> POJO -> CALCITE
and back fully.
There's an example for testing user-defined types in CustomFunctionTest, it could make sense to add a test to this class (maybe with a rename) or make a new class.
There is code for something like this in assertFullRoundTrip(Rel pojo1), however that assumes that only standard extensions and functions are loaded (for now).
We've had enough activity this week for there to have been merge conflicts 😅
I rebased this PR off of the current main
branch to deal with this.
calcite does not accept RelDatatypes with sqltypename.OTHER and has no way of representing it as of now. It will reject it at different steps such as RexLiteral Precondition type check or when building using the RexBuilder.
There's a ticket for this on Calcite's board but nothing as of of now.
one hacky solution would be: