github.com/dolthub/go-mysql-server@v0.18.0/enginetest/plangen/README.md (about)

     1  # Plangen
     2  
     3  This tool makes it easy to regenerate plan tests for our current plan suites:
     4  - `PlanTests`
     5  - `IndexPlanTests`
     6  - `IntegrationPlanTests`
     7  - `ImdbPlanTests`
     8  - `TpchPlanTests`
     9  - `TpcdsPlanTests`
    10  
    11  Devs still need to human-verify the correctness of plans created by this tool.
    12  
    13  The `main.go` file has a go generator line. The `testdata/spec.yaml` includes
    14  specifications of file paths and objects that seed in-place rewrites.
    15  
    16  # Background
    17  
    18  We have suites of "plan tests" that verify transform logic without executing
    19  plans. These have the obvious downside of not testing correctness, which
    20  is why most tests in the default `PlanTests` suite have companion correctness
    21  tests in `QueryTests`. Plan differences are easier to surface and root cause
    22  than data-dependent correctness failures, which makes them more flexible and
    23  user-friendly. When performing refactors or fixing correctness regressions, for
    24  example, plans are usually the easiest way to identify the breaking change at
    25  the first abstraction that matters: the execution plan.
    26  
    27