Dandandan commented on issue #1082:
URL: 
https://github.com/apache/arrow-datafusion/issues/1082#issuecomment-942696160


   It looks like PostgreSQL has some explicit operator (`HashSetOp`) for these 
kind of things:
   
   
   ```sql
   > explain select * from demo intersect select * from demo;
   
   HashSetOp Intersect  (cost=0.00..30.40 rows=160 width=458)
     ->  Append  (cost=0.00..28.00 rows=320 width=458)
           ->  Subquery Scan on "*SELECT* 1"  (cost=0.00..13.20 rows=160 
width=458)
                 ->  Seq Scan on demo  (cost=0.00..11.60 rows=160 width=454)
           ->  Subquery Scan on "*SELECT* 2"  (cost=0.00..13.20 rows=160 
width=458)
                 ->  Seq Scan on demo demo_1  (cost=0.00..11.60 rows=160 
width=454)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to