Implement window functions support

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: django
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      MongoDB provides $setWindowFields for performing window-based calculations like running totals, rankings, and moving averages.

      Definition of done

      • Implement support for translating Window() ORM expressions into $setWindowFields.
      • Support key operators ($sum, $avg, $rank, $denseRank, etc.).
      • Add functional tests or check Django's test suite (e.g., running total, per-category rank)

      Pitfalls

      • $setWindowFields requires sorted input (sortBy); ordering must be validated.
      • Must maintain consistency with Django’s SQL Window expression semantics.

            Assignee:
            Unassigned
            Reporter:
            Emanuel Lupi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: