cockroachdb / cockroachdb/cockroach

sql: full scans of virtual tables don't error out with `disallow_full_table_scans`

Open
#123,783 0 comments 0 reactions 0 assignees View on GitHub
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

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.