Skip to content

Commit

Permalink
opt: fix GenerateIndexScans comment
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
mgartner committed Mar 15, 2023
1 parent b9f2bdb commit d3db96f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions pkg/sql/opt/xform/scan_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ import (
// in that it behaves the exactly the same as a non-partial secondary index.
//
// NOTE: This does not generate index joins for non-covering indexes (except in
//
// case of ForceIndex). Index joins are usually only introduced "one level
// up", when the Scan operator is wrapped by an operator that constrains
// or limits scan output in some way (e.g. Select, Limit, InnerJoin).
// Index joins are only lower cost when their input does not include all
// rows from the table. See GenerateConstrainedScans,
// GenerateLimitedScans, and GenerateLimitedGroupByScans for cases where
// index joins are introduced into the memo.
// case of ForceIndex). Index joins are usually only introduced "one level up",
// when the Scan operator is wrapped by an operator that constrains or limits
// scan output in some way (e.g. Select, Limit, InnerJoin). Index joins are only
// lower cost when their input does not include all rows from the table. See
// GenerateConstrainedScans, GenerateLimitedScans, and
// GenerateLimitedGroupByScans for cases where index joins are introduced into
// the memo.
func (c *CustomFuncs) GenerateIndexScans(
grp memo.RelExpr, required *physical.Required, scanPrivate *memo.ScanPrivate,
) {
Expand Down

0 comments on commit d3db96f

Please sign in to comment.