You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/10/13 17:08:27 UTC
[GitHub] [arrow-datafusion] xudong963 edited a comment on issue #1082: Implement the rest of Set Operators
xudong963 edited a comment on issue #1082:
URL: https://github.com/apache/arrow-datafusion/issues/1082#issuecomment-942442780
> perhaps since `NULL = NULL` is not true, then semi join with equality isn't correct. 🤔
Yes.
```sql
postgres=# select * from bar;
a | b
---+---
1 | 2
| 3
3 | 4
(3 rows)
postgres=# select * from foo;
a | b
---+---
1 | 2
| 3
(2 rows)
-- intersect
select a from foo intersect select a from bar;
/**
a
---
1
(2 rows)
**/
-- equivalent transformation ? (x) since NULL = NULL is not true
select distinct a from foo where a in (select a from bar);
/**
a
---
1
(1 row)
**/
```
psql doesn't seem to have direct `SEMI JOIN`. It uses `IN` to do the same thing as `SEMI JOIN`. So how to use `is distinct from` in `select distinct a from foo where a in (select a from bar);`?
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org