Skip to content

Commit d628a31

Browse files
committed
clean up
1 parent f515323 commit d628a31

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sql/analyzer/replace_sort.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,8 @@ func replaceIdxSortHelper(ctx *sql.Context, scope *plan.Scope, node sql.Node, so
179179
}
180180
}
181181
newSort := sortNode.WithSortFields(sortFields)
182+
// The sort node is used to find table aliases and we need to get the table aliases inside the SubqueryAlias
182183
newSort.Child = c.Child
183-
if err != nil {
184-
return nil, transform.SameTree, err
185-
}
186184
newChildren[i], same, err = replaceIdxSortHelper(ctx, scope, child, newSort)
187185
case *plan.JoinNode:
188186
// It's (probably) not possible to have Sort as child of Join without Subquery/SubqueryAlias,

0 commit comments

Comments
 (0)