Support $getField conversion in Django QueryOptimizer

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: django
    • None
    • 🔵 Done
    • 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

      Our optimizer fails on simple binary operations for embedded fields because we reference embedded fields via $getField. We should evaluate $getField operations and see if they can get converted to dot notation so they can become find() style operations. 

      Definition of done

      Introduce code in QueryOptimizer to factor in $getField calls

      Pitfalls

      Will require thorough testing of both embedded model fields and JSONField. Be careful to avoid valid cases of $getField. 

            Assignee:
            Jib Adegunloye
            Reporter:
            Jib Adegunloye
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: