Skip to content

Commit 34f5169

Browse files
author
James Cor
committed
fix
1 parent 9248fe2 commit 34f5169

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

sql/analyzer/replace_sort.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ func replaceIdxSortHelper(ctx *sql.Context, scope *plan.Scope, node sql.Node, so
165165
if !c.JoinType().IsMerge() {
166166
continue
167167
}
168+
if sortNode == nil {
169+
continue
170+
}
168171
// TODO: skipping desc sorting for now
172+
// TODO: check that the sort fields are a prefix of the indexes
169173
hasDesc := false
170174
for _, sf := range sortNode.SortFields {
171175
if sf.Order == sql.Descending {

sql/rowexec/rel_iters.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ func (i *offsetIter) Next(ctx *sql.Context) (sql.Row, error) {
110110
}
111111
i.skip--
112112
}
113-
114-
// TODO: if i.childIter implements Offsetable Table?
115113
}
116114

117115
row, err := i.childIter.Next(ctx)

0 commit comments

Comments
 (0)