code: func IndexInfo2Cols(cols []*Column, index *model.IndexInfo) ([]*Column, []int) {
  	retCols := make([]*Column, 0, len(index.Columns))
  	lengths := make([]int, 0, len(index.Columns))
  	for _, c := range index.Columns {
  		col := indexCol2Col(cols, c)
  		if col == nil {
  			return retCols, lengths
  		}
  		retCols = append(retCols, col)
  		if c.Length != types.UnspecifiedLength && c.Length == col.RetType.Flen {
  			lengths = append(lengths, types.UnspecifiedLength)
  		} else {
  			lengths = append(lengths, c.Length)
  		}
  	}
  	return retCols, lengths
  }
docs: // IndexInfo2Cols gets the corresponding []*Column of the indexInfo's []*IndexColumn,
  // together with a []int containing their lengths.
  // If this index has three IndexColumn that the 1st and 3rd IndexColumn has corresponding *Column,
  // the return value will be only the 1st corresponding *Column and its length.