cockroachdb / cockroachdb/cockroach
sql: add randomized tests for plan pinning
Open
A-plan-management
A-statement-hint
C-enhancement
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
After finishing #170360, #170680, and #170692, we should add two randomized tests for plan pinning:
1. A test that (a) generates a random query, (b) uses `EXPLAIN (OPT, PLANGRAM)` to get the PlanGram, (c) pins the plan using the PlanGram, and then (d) validates that a PlanGram match was found and `EXPLAIN (OPT, PLANGRAM)` is the same.
2. A test that (a) generates a random query, (b) uses `EXPLAIN (GIST)` to get the plan gist, (c) pins the plan using the plan gist, and then (d) validates that a PlanGram match was found and `EXPLAIN (GIST)` is the same.
Jira issue: CRDB-64122
Epic: CRDB-66266
Contributor guide
Assessment
This issue has not been assessed yet.