Questions about the reflection with windowing function

hello,

I have a question about the reflection(is also materialization view) with windowing function.

My understanding is that,

Relecitions with windowing function must not exist filter and select items must can be expressed from view select item expressions

in the calcite:
the unifyRule focus on part pattern,so it can’t match.

the MaterializedViewRule can’t match too, I can’t find any code adout that sofa. but if I want to match, I should extend it in MaterializedViewRule but not unifyRule

Is my understanding right ?

is dremio match this case? if matched, how does it do?

reflection with windowing function example:

SELECT

ds,workspace_name,

sum(1) over(PARTITIONby ds,workspace_name orderby ds asc) as sum_cnt,

sum(1) over(PARTITIONby ds orderby ds asc) as sum_cnt

from dwd_airengine_query_pattern_delta_ht ;

I look forward to learn from you very much

thanks!

Dremio has separate materialization matching logic from calcite. Concerning window functions matching materializations, we rewrite windows functions to other functions before doing materialization matching. So our materialization matching does not consider window functions since they have been written out the query by that point.

Dremio’s materialization matching logic is base on MaterializedViewRule or UnifyRule?can you list a examples about the rewrite windows functions to other functions before doing materialization matching ? is this action Automatic?