Stamatis Zampetakis created CALCITE-3485:
--------------------------------------------

             Summary: Validation error in UDF with overloads and dynamic 
parameter
                 Key: CALCITE-3485
                 URL: https://issues.apache.org/jira/browse/CALCITE-3485
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.21.0
            Reporter: Stamatis Zampetakis
            Assignee: Stamatis Zampetakis


The problem can be reproduced by defining multiple user defined functions with 
the same name and trying to validate a query having at least one operand that 
is a dynamic parameter.

The interesting part of the stack trace is shown below:
{noformat}
com.onwbp.org.apache.calcite.runtime.CalciteContextException: At line 1, column 
84: 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 
com.onwbp.org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:463)
        at 
com.onwbp.org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:835)
        at 
com.onwbp.org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:820)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.newValidationError(SqlValidatorImpl.java:4881)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.inferUnknownTypes(SqlValidatorImpl.java:1801)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.inferUnknownTypes(SqlValidatorImpl.java:1880)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.validateWhereOrOn(SqlValidatorImpl.java:4052)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.validateWhereClause(SqlValidatorImpl.java:4044)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3386)
        at 
com.onwbp.org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60)
        at 
com.onwbp.org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:1009)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:969)
        at 
com.onwbp.org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:216)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:944)
        at 
com.onwbp.org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:651)
{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to