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
cardinality: tighten full-range fast path for index estimation
Two fixes raised in the release-8.5 cherry-pick review (PR #66695) that
also apply on master:
1. Move canSkipIndexEstimation ahead of IndexStatsIsInvalid so the
full-range fast path short-circuits before IndexStatsIsInvalid
queues an unnecessary async histogram load when the index stats are
not fully loaded. Guarded by idx != nil so the pseudo fallback is
preserved.
2. Reject ranges with LowExclude or HighExclude in
isFullRangeIncludingNulls. A range like (NULL, +inf) drops the
NULL endpoint and shrinks the result, so it must not trigger the
fast path.
Tighten TestCanSkipIndexEstimation to actually exercise these cases:
model 10 NULL rows in the index histogram (NullCount=10) so the
not-null estimate is strictly below RealtimeCount, switch the
assertion to require.Less, and add a case covering (NULL, +inf) with
an exclusive lower bound.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments