You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql/stats: include partial stats in results of statsCache.GetTableStats
We were not including partial stats in the list of table statistics
returned by `statsCache.GetTableStats`. This was fine for the optimizer,
which currently cannot use partial stats directly, but it was a problem
for backup.
We'd like to use partial stats directly in the optimizer eventually, so
this commit goes ahead and adds them to the results of `GetTableStats`.
The optimizer then must filter them out. To streamline this we add some
helper functions.
Finally, in an act of overzealous refactoring, this commit also changes
`MergedStatistics` and `ForecastTableStatistics` to accept partial
statistics and full statistics mixed together in the same input list.
This simplifies the code that calls these functions.
Fixes: #95056
Part of: #93983
Epic: CRDB-19449
Release note: None
returnnil, pgerror.Newf(pgcode.ObjectNotInPrerequisiteState, "the latest full statistic histogram for column %s is an inverted index histogram", column.GetName())
0 commit comments