Bug 1161045 - Teiid Designer:No error message for query with aggregate function and no group by clause
Summary: Teiid Designer:No error message for query with aggregate function and no grou...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Tooling
Version: 6.1.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ER4
: 6.1.0
Assignee: Barry LaFond
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-06 09:31 UTC by Jan Stastny
Modified: 2015-11-17 18:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-17 18:08:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker TEIIDDES-2382 0 Major Closed No error message for query with aggregate function and no group by clause 2014-11-17 16:22:02 UTC

Description Jan Stastny 2014-11-06 09:31:23 UTC
In designer when defining a table in view model with following transformation query, bad error message is returned to user.

SELECT cust.id AS customer_id, SUM(ord.amount) AS total_amount
FROM
customers AS cust INNER JOIN orders AS ord
ON cust.id = ord.customer_id
GROUP BY cust.id;

When user forgets to write the GROUP BY clause then error with following message occurs: "ERROR:ERROR".
When I execute similar query via teeid driver then I get very useful message: "Error: Remote org.teiid.api.exception.query.QueryValidatorException: Non-constant, non-aggregate expression cust.id cannot be mixed with aggregate functions and implicit grouping."
It would be very helpful if Teiid designer gave similar message instead of the "ERROR:ERROR" one.

Teiid Designer version:
8.6.0

Steps to reproduce:
1. Create a table and in the transformation editor write following select query (missing group by clause):
SELECT cust.id AS customer_id, SUM(ord.amount) AS total_amount
FROM
customers AS cust INNER JOIN orders AS ord
ON cust.id = ord.customer_id;
2. Save the editor content

Expected result:
helpful error message

Actual result:
"ERROR:ERROR" message

Comment 1 JBoss JIRA Server 2014-11-06 19:28:19 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2382 to Resolved

Comment 2 JBoss JIRA Server 2014-11-17 16:22:03 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2382 to Closed


Note You need to log in before you can comment on or make changes to this bug.