[
https://issues.jboss.org/browse/TEIID-2821?page=com.atlassian.jira.plugin...
]
Steven Hawkins resolved TEIID-2821.
-----------------------------------
Fix Version/s: 8.10
Resolution: Done
Updated the resolving logic to allow items from the grouping expressions.
Getting invalid Query against Postgres DB
-----------------------------------------
Key: TEIID-2821
URL:
https://issues.jboss.org/browse/TEIID-2821
Project: Teiid
Issue Type: Enhancement
Components: Query Engine
Affects Versions: 7.7
Reporter: Van Halbert
Assignee: Steven Hawkins
Priority: Minor
Fix For: 8.10
Issuing the following query when postgres datasource is the target:
SELECT SUM(TBALANCE) FROM TELLERS JOIN BRANCHES ON BRANCHES.BID=TELLERS.BID GROUP BY
TELLERS.BID ORDER BY TELLERS.BID
(which works when run directly against postgres)
And getting the following exception from Teiid:
Caused by: org.teiid.core.TeiidProcessingException: TEIID30088 Remote
org.teiid.api.exception.query.QueryResolverException: TEIID30088 Unrelated order by column
TELLERS.BID cannot be used in a SET query, with SELECT DISTINCT, or GROUP BY
at org.teiid.query.resolver.util.ResolverUtil.resolveOrderBy(ResolverUtil.java:422)
at
org.teiid.query.resolver.command.SimpleQueryResolver.resolveCommand(SimpleQueryResolver.java:94)
at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:270)
at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:124)
at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:260)
at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:370)
at org.teiid.dqp.internal.process.Request.processRequest(Request.java:436)
at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:600)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:309)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:248)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:269)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)