Re: EnumerableTableScan array/multiset handling

2024-06-03 Thread Christian Beikov
Hi Julian, it seems to me that org.apache.calcite.rel.type.RelDataTypeFactoryImpl.JavaType, which is a subtype of RelDataType, would be the best place to model this. How about I add an Accessor contract and a field to JavaType to take care of producing expressions for the enumerable adapater?

Re: EnumerableTableScan array/multiset handling

2024-05-30 Thread Julian Hyde
Thanks for doing these experiments, Christian, and documenting what you found. I think you’re running into the limitations of ReflectiveSchema. It works with POJOs (java classes with public fields) but hasn’t been tested for richer variations and therefore just doesn’t work. In many cases, it ca

EnumerableTableScan array/multiset handling

2024-05-24 Thread Christian Beikov
Hello, in my recent experiments I ran into some issues when trying to unnest an array of struct. The query is roughly this: select t.id, e.value1 from MyTable t, unnest(t.structArray) e EnumerableTableScan#fieldExpression will then try to generate code that converts the value of the "struc