code: def query(self, expr):
          
          from .query import CollectionVisitor
  
          if not isinstance(expr, six.string_types):
              raise ValueError('expr must be a string')
  
          frame = sys._getframe(2).f_locals
          try:
              env = frame.copy()
          finally:
              del frame
  
          visitor = CollectionVisitor(self, env)
          predicate = visitor.eval(expr)
          return self.filter(predicate)
docs: Query the data with a boolean expression.
  
          :param expr: the query string, you can use '@' character refer to environment variables.
          :return: new collection
          :rtype: :class:`odps.df.expr.expressions.CollectionExpr`