[teiid-issues] [JBoss JIRA] (TEIID-2501) window functions in view return incorrect results

Steven Hawkins (JIRA) issues at jboss.org
Mon Dec 16 10:02:35 EST 2013


     [ https://issues.jboss.org/browse/TEIID-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hawkins closed TEIID-2501.
---------------------------------


    
> 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, 7.7.8
>
>
> 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


More information about the teiid-issues mailing list