cockroachdb / cockroachdb/cockroach
opt: support more PlanGramMatchableFields
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
(Follow up from https://github.com/cockroachdb/cockroach/pull/170513 and https://github.com/cockroachdb/cockroach/pull/170556.)
PlanGrams currently only match on a few fields within expressions:
- `Table` / `LeftTable` / `RightTable`
- `Index` / `LeftIndex` / `RightIndex`
- `HasConstraint`
- `HasLimit`
- `JoinType`
There are other fields we could include that would make PlanGram matching more precise:
- sort order (list of columns)
- merge join order (list of columns)
- group by columns
- group by type
- distinct columns
- distinct type
- set op type
- autocommit
- eqColsAreKey
Jira issue: CRDB-65489
Contributor guide
Research direction
Start by reading the two linked pull requests and tracing the existing PlanGram matching for Table, Index, HasConstraint, HasLimit, and JoinType. Compare those fields with the additional sort, grouping, distinct, set-operation, autocommit, and key-related fields listed here. Done means the selected additional fields participate in PlanGram matching with appropriate coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100