def _validate(self):
    from ibis.expr.analysis import FilterValidator, is_reduction
    for expr in self.metrics:
        if ((not isinstance(expr, ir.ScalarExpr)) or (not is_reduction(expr))):
            raise TypeError(('Passed a non-aggregate expression: %s' % _safe_repr(expr)))
    for expr in self.having:
        if (not isinstance(expr, ir.BooleanScalar)):
            raise com.ExpressionError('Having clause must be boolean expression, was: {0!s}'.format(_safe_repr(expr)))
    all_exprs = (((self.metrics + self.by) + self.having) + self.sort_keys)
    self.table._assert_valid(all_exprs)
    validator = FilterValidator([self.table])
    validator.validate_all(self.predicates)
    assert self.schema
def _validate(self):
    from ibis.expr.analysis import FilterValidator, is_reduction
    for expr in self.metrics:
        if ((not isinstance(expr, ir.ScalarExpr)) or (not is_reduction(expr))):
            raise TypeError(('Passed a non-aggregate expression: %s' % _safe_repr(expr)))
    for expr in self.having:
        if (not isinstance(expr, ir.BooleanScalar)):
            raise com.ExpressionError('Having clause must be boolean expression, was: {0!s}'.format(_safe_repr(expr)))
    all_exprs = (((self.metrics + self.by) + self.having) + self.sort_keys)
    self.table._assert_valid(all_exprs)
    validator = FilterValidator([self.table])
    validator.validate_all(self.predicates)
    assert self.schema