Details
Description
Queries like:
SELECT LOWER(?)
Fails with:
Caused by: org.apache.calcite.runtime.CalciteContextException: At line 1, column 14: Illegal use of dynamic parameter at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:505) at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:932) at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:917) at org.apache.calcite.sql.validate.SqlValidatorImpl.newValidationError(SqlValidatorImpl.java:5266) at org.apache.calcite.sql.validate.SqlValidatorImpl.inferUnknownTypes(SqlValidatorImpl.java:1975) at org.apache.ignite.internal.processors.query.calcite.prepare.IgniteSqlValidator.inferUnknownTypes(IgniteSqlValidator.java:534) at org.apache.calcite.sql.validate.SqlValidatorImpl.inferUnknownTypes(SqlValidatorImpl.java:2057) at org.apache.ignite.internal.processors.query.calcite.prepare.IgniteSqlValidator.inferUnknownTypes(IgniteSqlValidator.java:534) at org.apache.calcite.sql.validate.SqlValidatorImpl.expandSelectItem(SqlValidatorImpl.java:461) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelectList(SqlValidatorImpl.java:4409) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3652)
We can try to infer types by type checker for SQL functions with
empty operandTypeInference.
Attachments
Issue Links
- is a child of
-
IGNITE-15658 Merge resolve Calcite tickets to 3.0
- Open
- is caused by
-
IGNITE-16836 Calcite engine. Dynamic parameter type can't be inferred for the most of built-in SQL functions
- Resolved
- is duplicated by
-
IGNITE-18282 Illegal use of dynamic parameter exception in SQL functions
- Resolved