I think that set subtraction is considerably harder than union. It is
unlikely to be a simple hack to an operator.
But it should be possible to build planner rules that expand an except
expression into a plan to do an outer join and filter away results that
have non-null right hand sides.
The
Thanks Arina.
I believe that EXCEPT is set subtraction A - B. Drill does (I believe) already
support UNION distinct, which is set union (A U B). If so, it would be a nice
little project for someone to implement EXCEPT by reversing the polarity of
comparison: discard the non-dups rather than
Hi Itisha,
Welcome to the Drill user mail list!
For those readers (like me) who are not familiar with the keyword, EXCEPT works
like UNION to join to SELECT statements: SELECT ... EXCEPT SELECT ... See [1].
Seems pretty useful.
A quick check of our parser source code suggests that Drill does