

def test_streaming():
    seq = [{
        'name': 'Alice',
        'x': 1,
    }, {
        'name': 'Bob',
        'x': 1,
    }]
    ns = {
        't': seq,
        'x': 10,
    }
    cache = dict()
    d = CachedDataset(ns, cache=cache)
    s = symbol('s', discover(d))
    expr = (s.t.x * 2)
    result = compute(expr, result)
    assert (not isinstance(d.cache[expr], Iterator))
    assert (into(list, d.cache[expr]) == [2, 2])

dataset/ETHPy150Open blaze/blaze/blaze/tests/test_cached.py test_streaming/VarMisuse@104/127 `d`->`result`