The suggested way on building agg. reflection for dataset with window function

hi everyone,

i have a trouble in building agg. reflection for a big volumn dataset, instead of using group by, i use the window function for fast computing. But I don’t know how to build the agg. reflection on this parent dataset in order to accelerate my child dataset , is there a way to build agg. reflection on top of window function?

eg:
CASE WHEN FIRST_VALUE(accessory_id) OVER (PARTITION BY cal._month, room_id ORDER BY accessory_id DESC )=accessory_id THEN TRUE ELSE FALSE END AS _is_dedup_mac_per_mth

many thanks in advance!

@crazyisjen Your window function does not have any measures (Group by) so what is the need for the Agg reflection

i was thinking can "order by " treat as min(), max() of the “measure”, “partition by” treat as “group by”, wonder if agg.reflection can can pre-calculate the max(accessory_id) group by month & room_id in advance for speeding up, finally i used raw reflection and seems performance is ok.