-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[opt](nereids) support partitionTopn for multi window exprs (#38393)
Support partitionTopn for multi window exprs. If row_number exists, choose row_number with the minimal limit value; if not, choose others with the minimal limit value. Example: ``` mysql> explain shape plan select * from (select row_number() over(partition by c1, c2 order by c3) as rn, rank() over(partition by c1 order by c3) as rk from push_down_multi_predicate_through_window_t) t where rn <= 1 and rk <= 1; +----------------------------------------------------------------------------------+ | Explain String(Nereids Planner) | +----------------------------------------------------------------------------------+ | PhysicalResultSink | | --PhysicalProject | | ----filter((rk <= 1) and (rn <= 1)) | | ------PhysicalWindow | | --------PhysicalQuickSort[LOCAL_SORT] | | ----------PhysicalDistribute[DistributionSpecHash] | | ------------PhysicalWindow | | --------------PhysicalQuickSort[LOCAL_SORT] | | ----------------PhysicalDistribute[DistributionSpecHash] | | ------------------PhysicalPartitionTopN | | --------------------PhysicalOlapScan[push_down_multi_predicate_through_window_t] | +----------------------------------------------------------------------------------+ ``` --------- Co-authored-by: zhongjian.xzj <zhongjian.xzj@zhongjianxzjdeMacBook-Pro.local>
- Loading branch information
1 parent
f63b4d8
commit 7998f6f
Showing
5 changed files
with
347 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.