Example #1
0
def test_selection():
    t = TableSymbol('t', '{name: string, amount: int, id: int}')

    s = selection(t, t['name'] == 'Alice')
    f = selection(t, t['id'] > t['amount'])
    p = t[t['amount'] > 100]
    with pytest.raises(ValueError):
        selection(t, p)

    assert s.dshape == t.dshape
Example #2
0
def test_selection():
    t = symbol('t', 'var * {name: string, amount: int, id: int}')

    s = selection(t, t['name'] == 'Alice')
    f = selection(t, t['id'] > t['amount'])
    p = t[t['amount'] > 100]
    with pytest.raises(ValueError):
        selection(t, p)

    assert s.dshape == t.dshape
Example #3
0
def test_selection():
    t = TableSymbol("t", "{name: string, amount: int, id: int}")

    s = selection(t, t["name"] == "Alice")
    f = selection(t, t["id"] > t["amount"])
    p = t[t["amount"] > 100]
    with pytest.raises(ValueError):
        selection(t, p)

    assert s.dshape == t.dshape
Example #4
0
def test_selection():
    t = TableSymbol('t', '{name: string, amount: int, id: int}')

    s = selection(t, t['name'] == 'Alice')

    assert s.dshape == t.dshape