Re: Regarding EXCEPT clause of drill

2020-01-16 Thread Ted Dunning
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

Re: Regarding EXCEPT clause of drill

2020-01-16 Thread Paul Rogers
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

Re: Regarding EXCEPT clause of drill

2020-01-15 Thread Paul Rogers
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