Is your feature request related to a problem?
Currently all arrays are created with type array<any>.
Reason: in OpenSearchTypeFactory.java#L176:
public static RelDataType convertExprTypeToRelDataType(ExprType fieldType, boolean nullable)
...
case ARRAY:
return TYPE_FACTORY.createArrayType(
TYPE_FACTORY.createSqlType(SqlTypeName.ANY, nullable), -1);
This raises a number of problem since we can not infer element types. E.g. when expanding an array, we can't know the element type until runtime.
What solution would you like?
Support creating array types with known element types.
What alternatives have you considered?
Not yet
Do you have any additional context?
Is your feature request related to a problem?
Currently all arrays are created with type
array<any>.Reason: in OpenSearchTypeFactory.java#L176:
This raises a number of problem since we can not infer element types. E.g. when expanding an array, we can't know the element type until runtime.
What solution would you like?
Support creating array types with known element types.
What alternatives have you considered?
Not yet
Do you have any additional context?
expandcommand with Calcite #3745 (comment)