doris
doris copied to clipboard
[feat](Nereids) push down predicates with multi columns through LogicalWindow and LogicalPartitionTopN
cherry-pick #36828 to branch-2.0
The requirement for predicate pushdown through the window operator is that the partition by slots of the window contains all slots in the predicate. The original implementation of doris only allows predicate pushdown with one slot. This PR relaxes this restriction and allows for predicate pushdown with multiple slots. The same applies to the predicate pushdown of the LogicalPartitionTopN operator. The following sql is an example.
select
*
from
(
select
row_number() over(partition by id, value1 order by value1) as num,
id,
value1
from
push_down_multi_column_predicate_through_window_t ) t
where
abs(id + value1)<4
and num <= 2;