You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: