@dispatch(Sub)
def _subexpr_optimize(expr):
    new_expr = type(expr)(*map(_subexpr_optimize, expr._args))
    schema = expr.schema
    # we have a timedelta shaped expression; sql timedeltas are in `ns` units
    # so we should coerce this exprssion over
    if isinstance(schema, TimeDelta) and schema.unit is not 'ns':
        new_expr = new_expr.coerce(timedelta_ns)
    return new_expr
dataset/ETHPy150Open blaze/blaze/blaze/compute/sql.py/_subexpr_optimize/operator `!=` -> `is not`