]
RH Bugzilla Integration updated TEIID-2501:
-------------------------------------------
Bugzilla Update: Perform
Bugzilla References:
window functions in view return incorrect results
-------------------------------------------------
Key: TEIID-2501
URL:
https://issues.jboss.org/browse/TEIID-2501
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.5
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Priority: Blocker
Fix For: 8.4
conditions and limits above a view are too broadly allowed to be pushed through a view
layer containing window functions.
From the forum posting for example:
{code}
SELECT
"StateProvinceID"
, COUNT(*) OVER (PARTITION BY a."CountryRegionCode") AS num
FROM salestaxrate a
WHERE "TaxType" = 3{code}
returns the correct counts, where as
{code}
SELECT *
FROM
(
SELECT
"StateProvinceID"
, COUNT(*) OVER (PARTITION BY a."CountryRegionCode") AS num
FROM salestaxrate a
WHERE "TaxType" = 3
) x
WHERE "StateProvinceID" = 45
{code}
returns counts where the state province id condition is applied before the windowing.
The currently logic will only prevent the criteria from being pushed if it is directly
applied against a computed window value.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: