Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-96579

Do not allow empty sortBy for $top/$topN/$bottom/$bottomN

    • Query Optimization

      While investigating BF-35556, I realized that we allow empty sortBy for $top/$topN/$bottom/$bottomN. But $top/$topN/$bottom/$bottomN accumulator specification says that sortBy is required. I can hardly imagine that such accumulator produces meaningful results for customers since results would not be deterministic.

      SERVER-96458 has an example in comments.

      Is it just an oversight or are there use cases?

      If it's just an oversight, can we forbid empty sortBy?

            Assignee:
            Unassigned Unassigned
            Reporter:
            yoonsoo.kim@mongodb.com Yoon Soo Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: