forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: do not collect stats for virtual columns
Previously, incorrect stats were collected for virtual computed columns. This was because DistSQLPlanner plans table readers on the table's primary index which does not include virtual computed columns. These stats were likely never used by the optimizer where all stats originate from Scans. Scans only produce stats for the columns they produce and Scans cannot produce virtual columns. So even though stats for virtual columns were collected, they never propagated through statistics estimation. This commit disables stats collection for virtual columns to avoid confusion and future bugs resulting from incorrect stats. Fixes cockroachdb#68186 Release note: None
- Loading branch information
Showing
2 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters