Skip to content

Commit

Permalink
c.starColFixedIndex > c.orderBy
Browse files Browse the repository at this point in the history
Signed-off-by: yangxuanjia <yangxuanjia@jd.com>
  • Loading branch information
yangxuanjia committed Apr 2, 2021
1 parent f059aa4 commit 1994b97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions go/vt/vtgate/engine/cached_size.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/vt/vtgate/engine/comparer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type comparer struct {
// 0 if both the rows have equal ordering
func (c *comparer) compare(r1, r2 []sqltypes.Value) (int, error) {
var colIndex int
if c.starColFixedIndex < len(r1) {
if c.starColFixedIndex > c.orderBy && c.starColFixedIndex < len(r1) {
colIndex = c.starColFixedIndex
} else {
colIndex = c.orderBy
Expand Down

0 comments on commit 1994b97

Please sign in to comment.