[JBoss JIRA] (TEIID-2501) window functions in view return incorrect results
by Steven Hawkins (JIRA)
[ 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
12 years, 11 months
[JBoss JIRA] (TEIID-2501) window functions in view return incorrect results
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2501?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-2501:
----------------------------------
Component/s: Query Engine
> 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
12 years, 11 months
[JBoss JIRA] (TEIID-2501) window functions in view return incorrect results
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2501?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-2501:
----------------------------------
Summary: window functions in view return incorrect results (was: Pushing through window function is projection )
Description:
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.
was:
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.
> window functions in view return incorrect results
> -------------------------------------------------
>
> 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 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
12 years, 11 months
[JBoss JIRA] (TEIID-2501) Pushing through window function is projection
by Steven Hawkins (JIRA)
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
12 years, 11 months
[JBoss JIRA] (TEIID-2500) Rewrite of case with true condition is not correct
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2500:
-------------------------------------
Summary: Rewrite of case with true condition is not correct
Key: TEIID-2500
URL: https://issues.jboss.org/browse/TEIID-2500
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Affects Versions: 6.0.0
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Priority: Critical
Fix For: 8.4
If a secondary searched case condition is always true, then the case will be inappropriately rewritten as just the then expression:
case when ... when true then x else y end
becomes just
x
However the prior cases should still be considered.
--
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
12 years, 11 months
[JBoss JIRA] (TEIID-2499) timing issue with asynch results procssing
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2499?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-2499.
-----------------------------------
Resolution: Done
Added a blocked exception if results are being sent to quickly.
> timing issue with asynch results procssing
> ------------------------------------------
>
> Key: TEIID-2499
> URL: https://issues.jboss.org/browse/TEIID-2499
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.3
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.4
>
>
> If the first results are sent to the client before the nonblockingrowprocessor is attached as a completionlistener, then the client may effectively drop results and throw an AsynchPositioningException. This was seen with TestAsynch.testAsynchContinuousEmpty since effectively no processing is performed.
--
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
12 years, 11 months
[JBoss JIRA] (TEIID-2499) timing issue with asynch results procssing
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2499:
-------------------------------------
Summary: timing issue with asynch results procssing
Key: TEIID-2499
URL: https://issues.jboss.org/browse/TEIID-2499
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Affects Versions: 8.3
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.4
If the first results are sent to the client before the nonblockingrowprocessor is attached as a completionlistener, then the client may effectively drop results and throw an AsynchPositioningException. This was seen with TestAsynch.testAsynchContinuousEmpty since effectively no processing is performed.
--
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
12 years, 11 months