[
https://issues.jboss.org/browse/TEIID-3878?page=com.atlassian.jira.plugin...
]
Mark Tawk commented on TEIID-3878:
----------------------------------
the script contains the materialized tables and the aggregation is in the attached query.
No materialized view represents an aggregate query in it.
java.lang.Integer cannot be cast to java.math.BigDecimal
--------------------------------------------------------
Key: TEIID-3878
URL:
https://issues.jboss.org/browse/TEIID-3878
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.11.3
Reporter: Mark Tawk
Assignee: Steven Hawkins
Priority: Critical
Attachments: TEIID-3878.sql
I'm using Teiid 8.11.3 with oracle translator.
I have an aggregated query using teiid materialized views with the following simplified
criteria:
(CASE WHEN ( "table1"."field1" = 1 ) THEN
"table2"."yearfield" ELSE null END IN (2014) )
The above criteria is reproducing a ClassCastException Integer cannot be cast to
BigDecimal
if I change the criteria to the following, it passes without a problem:
("table2"."yearfield" IN (2014) )
Here is the error stack:
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
at java.math.BigDecimal.compareTo(BigDecimal.java:219)
at org.teiid.query.sql.symbol.Constant$2.compare(Constant.java:99)
at org.teiid.query.eval.Evaluator.compare(Evaluator.java:581)
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:322)
at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:236)
at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:225)
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:219)
at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:353)
at
org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.process(EnhancedSortMergeJoinStrategy.java:460)
at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:227)
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
at
org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
at
org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
at
org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
at
org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:148)
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
at
org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:457)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:267)
at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:306)
at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:238)
at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:175)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:260)
at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:173)
at com.sun.proxy.$Proxy31.executeRequest(Unknown Source)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:667)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:533)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1068)
at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:320)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)