Simplify and fix analyze_plan.js helpers

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When writing a jstest that makes assertions about a plan, you usually want to use the helpers in analyze_plan.js so that your test will handle all the different plan shapes that can happen in passthrough suites.

      However, there are a lot of helpers, which makes it hard to know which to use.

      Also, some of the helpers apparently don't work in all cases. I was recently surprised that aggPlanHasStage() apparently does not check the mergerPart of the pipeline. (Other cases like $lookup not explaining its subpipeline, would require server changes to fix.)

      Let's:

      • review the list of helpers and decide which ones need to exist, vs which ones can be removed or combined,
      • fix obvious problems like aggPlanHasStage() not checking the entire plan.

              Assignee:
              Unassigned
              Reporter:
              David Percy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: