megv
megv

Reputation: 1461

Hive query with with booleans evaluate to null

I want on those cases of a.email where there is no b.email mathc. So that b.email will be null in this case, but I am not sure how to correctly write the hive query for this

select a.email, b.email from dir1 a left outer join on dir1 b where b.email is null

The output I would expect is

[email protected] [email protected]
[email protected] NULL

I only want to keep the cases where there is a NULL on the right hand side

Upvotes: 2

Views: 1077

Answers (1)

megv
megv

Reputation: 1461

use where b.email IS NULL

select a.email, b.email from dir1 a left outer join on dir1 b where b.email is null

Upvotes: 1

Related Questions