-
Bug
-
Resolution: Done
-
Blocker
-
7.5
-
None
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:
SELECT
"StateProvinceID"
, COUNT(*) OVER (PARTITION BY a."CountryRegionCode") AS num
FROM salestaxrate a
WHERE "TaxType" = 3
returns the correct counts, where as
SELECT *
FROM
(
SELECT
"StateProvinceID"
, COUNT(*) OVER (PARTITION BY a."CountryRegionCode") AS num
FROM salestaxrate a
WHERE "TaxType" = 3
) x
WHERE "StateProvinceID" = 45
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.