"java.lang.ClassCastException" running DV query with criteria

Solution Verified - Updated -

Issue

  • Select without criteria returns, but adding criteria with a column derived from case statements fails with ClassCastException.
ERROR [org.teiid.PROCESSOR] (Worker133_QueryProcessorQueue5109) TEIID30019 Unexpected exception for request Zplru34y5LCX.5: java.lang.ClassCastException: org.teiid.query.sql.symbol.Constant cannot be cast to org.teiid.query.sql.symbol.Array
        at org.teiid.query.optimizer.relational.rules.CriteriaCapabilityValidatorVisitor$1.visit(CriteriaCapabilityValidatorVisitor.java:894) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.sql.lang.DependentSetCriteria.acceptVisitor(DependentSetCriteria.java:161) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.optimizer.relational.rules.CriteriaCapabilityValidatorVisitor.canPushLanguageObject(CriteriaCapabilityValidatorVisitor.java:957) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.optimizer.relational.rules.CriteriaCapabilityValidatorVisitor.canPushLanguageObject(CriteriaCapabilityValidatorVisitor.java:861) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.optimizer.relational.rules.RuleRaiseAccess.canRaiseOverSelect(RuleRaiseAccess.java:512) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.optimizer.relational.rules.RulePushSelectCriteria.examinePath(RulePushSelectCriteria.java:442) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.optimizer.relational.rules.RulePushSelectCriteria.pushTowardOriginatingNode(RulePushSelectCriteria.java:353) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.optimizer.relational.rules.RulePushSelectCriteria.execute(RulePushSelectCriteria.java:116) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:932) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:228) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:448) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.dqp.internal.process.Request.processRequest(Request.java:476) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:642) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.12.6_4-redhat-64-2.jar:8.12.12.6_4-redhat-64-2]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_171]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_171]
        at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_171]

Environment

  • Red Hat JBoss Data Virtualization (DV) 6.3, 6.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In