Skip to content

Commit

Permalink
expression: fix typo (pingcap#4958)
Browse files Browse the repository at this point in the history
  • Loading branch information
mccxj authored and winoros committed Oct 31, 2017
1 parent 55403c8 commit 873e951
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions expression/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func (s *Schema) Clone() *Schema {
}
schema := NewSchema(cols...)
schema.SetUniqueKeys(keys)
schema.TblID2Handle = make(map[int64][]*Column)
for id, cols := range s.TblID2Handle {
schema.TblID2Handle[id] = make([]*Column, 0, len(cols))
for _, col := range cols {
Expand Down Expand Up @@ -116,8 +115,8 @@ func (s *Schema) FindColumnAndIndex(astCol *ast.ColumnName) (*Column, int, error
idx = i
} else {
// For query like:
// create t1(a int); create t2(d int);
// select 1 from t1, t2 where 1 = (select d from t2 where a > 1) where d = 1;
// create table t1(a int); create table t2(d int);
// select 1 from t1, t2 where 1 = (select d from t2 where a > 1) and d = 1;
// we will get an Apply operator whose schema is [test.t1.a, test.t2.d, test.t2.d],
// we check whether the column of the schema comes from a subquery to avoid
// causing the ambiguous error when resolve the column `d` in the Selection.
Expand Down

0 comments on commit 873e951

Please sign in to comment.