Github user gatorsmile commented on the pull request:
https://github.com/apache/spark/pull/10689#issuecomment-170619409
Give two tables `tbl_a` and `tbl_b`, `tbl_a` has **billions** of rows but
`tbl_b` has **thousands** of rows. `tbl_a` has one column `col_frkey_tbl_a`
whose values should be from `tbl_b`'s column `col_key_tbl_b`. However, one user
wants to do a quick check to confirm it. The query he can try is
```
select col_frkey_tbl_a from db.tbl_a limit 10000
intersect
select col_key_tbl_b from db.tbl_b
```
The above query can avoid fetching billions of rows from `tbl_a`.
Hopefully, it can answer your question. @hvanhovell
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]