[JBoss JIRA] (TEIID-5232) Add ability to call system functions on VDB Datasource
by Debbie Steigner (JIRA)
[ https://issues.jboss.org/browse/TEIID-5232?page=com.atlassian.jira.plugin... ]
Debbie Steigner commented on TEIID-5232:
----------------------------------------
[~shawkins] Correct her VDB uses other VDBs as datasources and she wants to use teiid_session_set at runtime on the Datasource VDBs
> Add ability to call system functions on VDB Datasource
> ------------------------------------------------------
>
> Key: TEIID-5232
> URL: https://issues.jboss.org/browse/TEIID-5232
> Project: Teiid
> Issue Type: Feature Request
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
>
> Add ability to call the system function teiid_session_set on a EAP VDB datasource
> When i send :
> select teiid_session_set('project','myProject');
> My session variable is changed only on my vdb. I would want to send this command to my VDB EAP datasource. I need to let my vdb's client the opportunity to call teiid_session_set in one of my datasource dynamically. For now, the only way i have found is putting this on my datasource configuration :
> <new-connection-sql>select teiid_session_set('country','BELGIUM')</new-connection-sql>
> The problem is that this sql request is only called once, at the vdb deployment. I would like to be able to call this request at runtime.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5345) ClassCastException if multi-column dependent join is pushed to literals
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5345?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5345:
----------------------------------
Description:
Select without criteria returns - select * from table, If adding criteria on col_CD it fails with ClassCastException[1].
[1]
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]
was:
Select without criteria returns - select * from table, If adding criteria on col_CD it fails with ClassCastException[1]. I assume it's because on some sources the col_CD is derived by a case statement[2].
[1]
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]
[2]
SELECT_CRITERIA=CASE WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), LPAD(City_Code, 2, '0')) WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) >= 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), City_Code) WHEN (LENGTH(Prov_Code) >= 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(Prov_Code, LPAD(City_Code, 2, '0')) ELSE CONCAT(Prov_Code, City_Code) END = '66131'
Summary: ClassCastException if multi-column dependent join is pushed to literals (was: ClassCastException if criteria column is derived from case statement)
> ClassCastException if multi-column dependent join is pushed to literals
> -----------------------------------------------------------------------
>
> Key: TEIID-5345
> URL: https://issues.jboss.org/browse/TEIID-5345
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.12.6_4
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
>
> Select without criteria returns - select * from table, If adding criteria on col_CD it fails with ClassCastException[1].
> [1]
> 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]
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5346) Improve costing of literals even with unknown values
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5346:
-------------------------------------
Summary: Improve costing of literals even with unknown values
Key: TEIID-5346
URL: https://issues.jboss.org/browse/TEIID-5346
Project: Teiid
Issue Type: Enhancement
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 11.0
In the nodes above a projected literal if there are unknown cardinalities will become ndv unknown - rather than the expected ndv/nnv.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5345) ClassCastException if criteria column is derived from case statement
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5345?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5345:
---------------------------------------
This can still be reproduced on master with a small example:
select pm1.g2.e1 from pm1.g2 inner join /*+ makedep */ (select 1 as x, 'a' as y, e1 from pm1.g1 union all select 2, 'b', e1 from pm2.g1) v on y = pm1.g2.e1 and x = pm1.g2.e2
> ClassCastException if criteria column is derived from case statement
> --------------------------------------------------------------------
>
> Key: TEIID-5345
> URL: https://issues.jboss.org/browse/TEIID-5345
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.12.6_4
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
>
> Select without criteria returns - select * from table, If adding criteria on col_CD it fails with ClassCastException[1]. I assume it's because on some sources the col_CD is derived by a case statement[2].
> [1]
> 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]
> [2]
> SELECT_CRITERIA=CASE WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), LPAD(City_Code, 2, '0')) WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) >= 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), City_Code) WHEN (LENGTH(Prov_Code) >= 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(Prov_Code, LPAD(City_Code, 2, '0')) ELSE CONCAT(Prov_Code, City_Code) END = '66131'
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5345) ClassCastException if criteria column is derived from case statement
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5345?page=com.atlassian.jira.plugin... ]
Work on TEIID-5345 started by Steven Hawkins.
---------------------------------------------
> ClassCastException if criteria column is derived from case statement
> --------------------------------------------------------------------
>
> Key: TEIID-5345
> URL: https://issues.jboss.org/browse/TEIID-5345
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.12.6_4
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
>
> Select without criteria returns - select * from table, If adding criteria on col_CD it fails with ClassCastException[1]. I assume it's because on some sources the col_CD is derived by a case statement[2].
> [1]
> 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]
> [2]
> SELECT_CRITERIA=CASE WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), LPAD(City_Code, 2, '0')) WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) >= 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), City_Code) WHEN (LENGTH(Prov_Code) >= 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(Prov_Code, LPAD(City_Code, 2, '0')) ELSE CONCAT(Prov_Code, City_Code) END = '66131'
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5345) ClassCastException if criteria column is derived from case statement
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5345?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5345:
---------------------------------------
Looks like this does not occur on master. I'll see if it has been directly fixed or if there was some intervening planning change.
> ClassCastException if criteria column is derived from case statement
> --------------------------------------------------------------------
>
> Key: TEIID-5345
> URL: https://issues.jboss.org/browse/TEIID-5345
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.12.6_4
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
>
> Select without criteria returns - select * from table, If adding criteria on col_CD it fails with ClassCastException[1]. I assume it's because on some sources the col_CD is derived by a case statement[2].
> [1]
> 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]
> [2]
> SELECT_CRITERIA=CASE WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), LPAD(City_Code, 2, '0')) WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) >= 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), City_Code) WHEN (LENGTH(Prov_Code) >= 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(Prov_Code, LPAD(City_Code, 2, '0')) ELSE CONCAT(Prov_Code, City_Code) END = '66131'
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5345) ClassCastException if criteria column is derived from case statement
by Debbie Steigner (JIRA)
[ https://issues.jboss.org/browse/TEIID-5345?page=com.atlassian.jira.plugin... ]
Debbie Steigner updated TEIID-5345:
-----------------------------------
Description:
Select without criteria returns - select * from table, If adding criteria on col_CD it fails with ClassCastException[1]. I assume it's because on some sources the col_CD is derived by a case statement[2].
[1]
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]
[2]
SELECT_CRITERIA=CASE WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), LPAD(City_Code, 2, '0')) WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) >= 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), City_Code) WHEN (LENGTH(Prov_Code) >= 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(Prov_Code, LPAD(City_Code, 2, '0')) ELSE CONCAT(Prov_Code, City_Code) END = '66131'
was:
Select without criteria returns - select * from XXX_LOC_EDL.LOC_BNDRY, If adding criteria on BNDRY_CD it fails with ClassCastException[1]. I assume it's because on some sources the BNDRY_CD is derived by a case statement[2].
[1]
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]
[2]
SELECT_CRITERIA=CASE WHEN (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code) < 2) AND (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) < 2) THEN CONCAT(LPAD(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code, 2, '0'), LPAD(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code, 2, '0')) WHEN (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code) < 2) AND (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) >= 2) THEN CONCAT(LPAD(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code, 2, '0'), RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) WHEN (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code) >= 2) AND (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) < 2) THEN CONCAT(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code, LPAD(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code, 2, '0')) ELSE CONCAT(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code, RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) END = '66131'
> ClassCastException if criteria column is derived from case statement
> --------------------------------------------------------------------
>
> Key: TEIID-5345
> URL: https://issues.jboss.org/browse/TEIID-5345
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.12.6_4
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
>
> Select without criteria returns - select * from table, If adding criteria on col_CD it fails with ClassCastException[1]. I assume it's because on some sources the col_CD is derived by a case statement[2].
> [1]
> 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]
> [2]
> SELECT_CRITERIA=CASE WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), LPAD(City_Code, 2, '0')) WHEN (LENGTH(Prov_Code) < 2) AND (LENGTH(City_Code) >= 2) THEN CONCAT(LPAD(Prov_Code, 2, '0'), City_Code) WHEN (LENGTH(Prov_Code) >= 2) AND (LENGTH(City_Code) < 2) THEN CONCAT(Prov_Code, LPAD(City_Code, 2, '0')) ELSE CONCAT(Prov_Code, City_Code) END = '66131'
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5345) ClassCastException if criteria column is derived from case statement
by Debbie Steigner (JIRA)
Debbie Steigner created TEIID-5345:
--------------------------------------
Summary: ClassCastException if criteria column is derived from case statement
Key: TEIID-5345
URL: https://issues.jboss.org/browse/TEIID-5345
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.12.12.6_4
Reporter: Debbie Steigner
Assignee: Steven Hawkins
Select without criteria returns - select * from XXX_LOC_EDL.LOC_BNDRY, If adding criteria on BNDRY_CD it fails with ClassCastException[1]. I assume it's because on some sources the BNDRY_CD is derived by a case statement[2].
[1]
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]
[2]
SELECT_CRITERIA=CASE WHEN (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code) < 2) AND (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) < 2) THEN CONCAT(LPAD(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code, 2, '0'), LPAD(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code, 2, '0')) WHEN (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code) < 2) AND (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) >= 2) THEN CONCAT(LPAD(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code, 2, '0'), RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) WHEN (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code) >= 2) AND (LENGTH(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) < 2) THEN CONCAT(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code, LPAD(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code, 2, '0')) ELSE CONCAT(RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.Prov_Code, RDS_PH_APPS_IMSMasterfiles_DS.UNICUST.City_Code) END = '66131'
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months