Closed tspurway closed 10 years ago
Add a "contains" function for Column that handles following cases:
With this feature, Hustle can handle nested select queries,
select(t.c1, t.c2, where = (t.c3.contains( select(t1.c3, where=(t1.c5 == 'foo') ))))
Added this feature in the develop branch commit 10de07ec533d1268131889496f2efd9ef2b5430e
The Column currently doesn't support the in operator, which would allow you to easily test the column against a collection of values. You currently have to do this with the | operator.
Ideally, we would have a Column Expression like:
however, in Python, this is actually implemented by overriding the in operator on the list class, which is not something we want to do. We want to override operators only on the Column class.
In the fine tradition of overloading bitwise operators for operations in our DSL, I would suggest overloading the << operator on the Column class thusly: