From d3db96fde0b8d667aafb4ecf7f0a973f656a1241 Mon Sep 17 00:00:00 2001 From: Marcus Gartner Date: Wed, 15 Mar 2023 16:01:42 -0400 Subject: [PATCH] opt: fix GenerateIndexScans comment Release note: None --- pkg/sql/opt/xform/scan_funcs.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg/sql/opt/xform/scan_funcs.go b/pkg/sql/opt/xform/scan_funcs.go index b2d4c4eb88f6..bd4bd15c391a 100644 --- a/pkg/sql/opt/xform/scan_funcs.go +++ b/pkg/sql/opt/xform/scan_funcs.go @@ -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, ) {