Description
Suppose we're defining the following table:
.field("ID", SqlTypeName.INTEGER) .field("MAPFIELD", typeFactory.createMapType( typeFactory.createSqlType(SqlTypeName.VARCHAR), typeFactory.createTypeWithNullability( typeFactory.createSqlType(SqlTypeName.INTEGER), true))) .field("NESTEDMAPFIELD", typeFactory.createMapType( typeFactory.createSqlType(SqlTypeName.VARCHAR), typeFactory.createTypeWithNullability( typeFactory.createMapType( typeFactory.createSqlType(SqlTypeName.VARCHAR), typeFactory.createTypeWithNullability( typeFactory.createSqlType(SqlTypeName.INTEGER), true)) , true))) .field("ARRAYFIELD", typeFactory.createArrayType( typeFactory.createTypeWithNullability( typeFactory.createSqlType(SqlTypeName.INTEGER), true), -1L))
and query like this:
SELECT * FROM <TBL> WHERE MAPFIELD['a'] = 1
When we evaluate that query, JaninoRexCompiler throws an Exception saying there's no SqlFunctions.eq(Object, int).
I took a breakpoint on BinaryImplementor.implement() to see variables just before compiler finds SqlFunctions.eq().
The type of expression is Object which is not generic, but seems like matching RexCall operand have value type information.
(I mean type mismatch occurs.)
Attachments
Issue Links
- contains
-
CALCITE-1387 CAST(ITEM() as INTEGER) throws RuntimeException in Runtime when return value of ITEM() is null
- Closed