Skip to content

Commit 5faec4e

Browse files
committed
Amend replace_order_by_distance.go
1 parent d49e613 commit 5faec4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/analyzer/replace_order_by_distance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func replaceIdxOrderByDistanceHelper(ctx *sql.Context, scope *plan.Scope, node s
118118
var err error
119119
same := transform.SameTree
120120
switch c := child.(type) {
121-
case *plan.Project, *plan.TableAlias, *plan.ResolvedTable, *plan.Filter, *plan.Limit, *plan.Offset, *plan.Sort, *plan.IndexedTableAccess:
121+
case *plan.Project, *plan.TableAlias, *plan.ResolvedTable, *plan.Filter, *plan.Limit, *plan.TopN, *plan.Offset, *plan.Sort, *plan.IndexedTableAccess:
122122
newChildren[i], same, err = replaceIdxOrderByDistanceHelper(ctx, scope, child, sortNode)
123123
default:
124124
newChildren[i] = c

0 commit comments

Comments
 (0)