[
https://issues.jboss.org/browse/TEIID-2501?page=com.atlassian.jira.plugin...
]
Steven Hawkins resolved TEIID-2501.
-----------------------------------
Resolution: Done
Corrected the criteria pushing check to only push conditions that are effectively applied
against all every window function's partition. Also added a needed check to not push
unordered limits through window function projection.
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:
http://www.atlassian.com/software/jira