cockroachdb / cockroachdb/cockroach
sql: full scans of virtual tables don't error out with `disallow_full_table_scans`
Open
C-enhancement
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Found when working on #123780.
What happens is that we assign the huge cost to plans with full scans of virtual tables, but then we don't set `exec.PlanFlagContainsFullTableScan` in the execbuilder. Thus, if there is no alternative plan, the plan with the full scan is not rejected in `makeExecPlan` because the plan flag is not set.
Jira issue: CRDB-38546
Contributor guide
Assessment
This issue has not been assessed yet.