Allow `row_number` `rank` without `PARTITION BY` when using Top-N pattern · Issue #21991 · risingwavelabs/risingwave · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For top-N queies with something like RANK() OVER (PARTITION BY CAST(1 AS INT) ORDER BY some_column) AS rank, the plan won't be optimal because we don't do 2-phase optimization for GroupTopN, but the function call actually is global TopN (group by a constant). Since the number of input for OverWindow is limited after GroupTopN, we can allow eliminate PARTITION BY in such queries.
The text was updated successfully, but these errors were encountered:
As a background, we currently don't support general window function calls without PARTITION BY because we believe the performance won't be good and the user should rethink about their query. #11505
For top-N queies with something like
RANK() OVER (PARTITION BY CAST(1 AS INT) ORDER BY some_column) AS rank
, the plan won't be optimal because we don't do 2-phase optimization for GroupTopN, but the function call actually is global TopN (group by a constant). Since the number of input for OverWindow is limited after GroupTopN, we can allow eliminatePARTITION BY
in such queries.The text was updated successfully, but these errors were encountered: