cockroachdb / cockroachdb/cockroach

sql: add randomized tests for plan pinning

Open
#170,693 1 comment 0 reactions 1 assignee Claimed by @michae2 View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.