def test_leaves(): t = TableSymbol('t', '{id: int32, name: string}') v = TableSymbol('v', '{id: int32, city: string}') x = symbol('x', 'int32') assert t._leaves() == [t] assert t.id._leaves() == [t] assert by(t.name, count=t.id.nunique())._leaves() == [t] assert join(t, v)._leaves() == [t, v] assert join(v, t)._leaves() == [v, t] assert (x + 1)._leaves() == [x]
def test_leaves(): t = TableSymbol('t', '{id: int32, name: string}') v = TableSymbol('v', '{id: int32, city: string}') x = Symbol('x', 'int32') assert t._leaves() == [t] assert t.id._leaves() == [t] assert by(t.name, t.id.nunique())._leaves() == [t] assert join(t, v)._leaves() == [t, v] assert join(v, t)._leaves() == [v, t] assert (x + 1)._leaves() == [x]
def test_leaves(): t = TableSymbol("t", "{id: int32, name: string}") v = TableSymbol("v", "{id: int32, city: string}") x = symbol("x", "int32") assert t._leaves() == [t] assert t.id._leaves() == [t] assert by(t.name, count=t.id.nunique())._leaves() == [t] assert join(t, v)._leaves() == [t, v] assert join(v, t)._leaves() == [v, t] assert (x + 1)._leaves() == [x]