code: func getEQFunctionOffset(expr expression.Expression, cols []*model.IndexColumn) int {
  	f, ok := expr.(*expression.ScalarFunction)
  	if !ok || f.FuncName.L != ast.EQ {
  		return -1
  	}
  	if c, ok := f.GetArgs()[0].(*expression.Column); ok {
  		if _, ok := f.GetArgs()[1].(*expression.Constant); ok {
  			for i, col := range cols {
  				if col.Name.L == c.ColName.L {
  					return i
  				}
  			}
  		}
  	} else if _, ok := f.GetArgs()[0].(*expression.Constant); ok {
  		if c, ok := f.GetArgs()[1].(*expression.Column); ok {
  			for i, col := range cols {
  				if col.Name.L == c.ColName.L {
  					return i
  				}
  			}
  		}
  	}
  	return -1
  }
docs: // getEQFunctionOffset judge if the expression is a eq function like A = 1 where a is an index.
  // If so, it will return the offset of A in index columns. e.g. for index(C,B,A), A's offset is 2.