[teiid-issues] [JBoss JIRA] (TEIID-2501) Pushing through window function is projection

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Mon May 13 14:29:06 EDT 2013


Steven Hawkins created TEIID-2501:
-------------------------------------

             Summary: Pushing through window function is projection 
                 Key: TEIID-2501
                 URL: https://issues.jboss.org/browse/TEIID-2501
             Project: Teiid
          Issue Type: Bug
    Affects Versions: 7.5
            Reporter: Steven Hawkins
            Assignee: Steven Hawkins
            Priority: Blocker
             Fix For: 8.4


conditions and limits 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