Push $limit stage into $sort pushdown for time-series collection

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Add time-series query rewrite to push $limit into $sort (for sort on the metadata field) so that we don't sort buckets that are not necessary

      It is safe to assume that every bucket has at least one measurement. We should rewrite [\{$_unpack}, \{$sort}, \{$limit: x}] pipeline as [\{$sort(with limit)}, \{$_unpack}, \{$limit: x}]

            Assignee:
            Alice Li (Inactive)
            Reporter:
            Alice Li (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: