def test_serializable():
    t = Symbol('t', 'var * {id: int, name: string, amount: int}')
    import pickle
    t2 = pickle.loads(pickle.dumps(t))

    assert t.isidentical(t2)

    s = Symbol('t', 'var * {id: int, city: string}')
    expr = join(t[0 < t.amount], s).sort('id').city.head()
    expr2 = pickle.loads(pickle.dumps(expr))

    assert expr.isidentical(expr2)
dataset/ETHPy150Open blaze/blaze/blaze/expr/tests/test_symbol.py/test_serializable/swapped operands of `<`