Add TopNRowNumberFuzzer for TopNRowNumber operator #12017
Open
Description
Description
TopNRowNumber operator is used for queries like
SELECT *, row_number() over (partition by c0 order by c1) as rn FROM tmp WHERE rn <= {some_number}
It is an optimized window operator which retains only the top "some_number" rows for each window partition. The window partitions are identified using a HashTable (vs Window operator which accumulates all the input rows in memory and then sorts them to identify partitions).
This operator is being subsequently enhanced to handle rank() and dense_rank() functions as well.
It would be nice to have a fuzzer on the lines of https://github.com/facebookincubator/velox/blob/main/velox/exec/fuzzer/RowNumberFuzzer.h for the TopNRowNumber operator to make it more robust.