code: func getEqOrInColOffset(expr expression.Expression, cols []*expression.Column) int {
  	f, ok := expr.(*expression.ScalarFunction)
  	if !ok {
  		return -1
  	}
  	if f.FuncName.L == ast.EQ {
  		if c, ok := f.GetArgs()[0].(*expression.Column); ok {
  			if _, ok := f.GetArgs()[1].(*expression.Constant); ok {
  				for i, col := range cols {
  					if col.Equal(nil, c) {
  						return i
  					}
  				}
  			}
  		}
  		if c, ok := f.GetArgs()[1].(*expression.Column); ok {
  			if _, ok := f.GetArgs()[0].(*expression.Constant); ok {
  				for i, col := range cols {
  					if col.Equal(nil, c) {
  						return i
  					}
  				}
  			}
  		}
  	}
  	if f.FuncName.L == ast.In {
  		c, ok := f.GetArgs()[0].(*expression.Column)
  		if !ok {
  			return -1
  		}
  		for _, arg := range f.GetArgs()[1:] {
  			if _, ok := arg.(*expression.Constant); !ok {
  				return -1
  			}
  		}
  		for i, col := range cols {
  			if col.Equal(nil, c) {
  				return i
  			}
  		}
  	}
  	return -1
  }
docs: // getEqOrInColOffset checks if the expression is a eq function that one side is constant and another is column or an
  // in function which is `column in (constant list)`.
  // If so, it will return the offset of this column in the slice, otherwise return -1 for not found.