Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
winoros committed Aug 24, 2018
1 parent 1ea1dc1 commit 6d85229
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion expression/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ func IndexInfo2Cols(cols []*Column, index *model.IndexInfo) ([]*Column, []int) {
}

// FindColumnsByUniqueIDs will find columns by checking the unique id.
// Note: This id list must be a subset of the column slice.
// Note: `ids` must be a subset of the column slice.
func FindColumnsByUniqueIDs(cols []*Column, ids []int) []*Column {
retCols := make([]*Column, 0, len(ids))
for _, id := range ids {
Expand Down
4 changes: 2 additions & 2 deletions plan/logical_plans_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func (s *testUnitTestSuit) SubstituteCol2CorCol(expr expression.Expression, colI
}
newArgs = append(newArgs, newArg)
}
newSf := expression.NewFunctionInternal(x.GetCtx(), x.FuncName.L, x.GetType(), newArgs...)
return newSf, nil
newSf, err := expression.NewFunction(x.GetCtx(), x.FuncName.L, x.GetType(), newArgs...)
return newSf, errors.Trace(err)
case *expression.Column:
if _, ok := colIDs[x.UniqueID]; ok {
return &expression.CorrelatedColumn{Column: *x}, nil
Expand Down

0 comments on commit 6d85229

Please sign in to comment.