def test_iscolumn():
    a = Symbol('a', 'var * {x: int, y: int, z: int}')
    assert not iscolumn(a)
    assert iscolumn(a['x'])
    assert not iscolumn(a[['x', 'y']])
    assert not iscolumn(a[['x']])
    assert iscolumn((a['x'] + a['y']))
    assert iscolumn(a['x'].distinct())
    assert not iscolumn(a[['x']].distinct())
    assert not iscolumn(by(a['x'], total=a['y'].sum()))
    assert iscolumn(a['x'][a['x'] > 1])
    assert not iscolumn(a[['x', 'y']][1 > a['x']])
    assert iscolumn(a['x'].sort())
    assert not iscolumn(a[['x', 'y']].sort())
    assert iscolumn(a['x'].head())
    assert not iscolumn(a[['x', 'y']].head())

    assert iscolumn(Symbol('b', 'int'))
    assert not iscolumn(Symbol('b', 'var * {x: int}'))
dataset/ETHPy150Open blaze/blaze/blaze/expr/tests/test_symbol.py/test_iscolumn/swapped operands of `>`