TopK planning logic.
We provide a plan (TopKPlan) encoding variants of the TopK operator, and provide implementations specific to plan variants.
The TopK variants can be distinguished as follows:
- Nested message and enum types in
- A plan for generic TopKs that don’t fit any more specific category.
- A plan for monotonic TopKs with an offset of 0 and a limit of 1.
- A plan for monotonic TopKs with an offset of 0 and an arbitrary limit.
- A plan encapsulating different variants to compute a TopK operation.