Can some explain what is the difference between these 2 queries in HiveQL. Basically I wanted to filter out the dates to be greater than 2017-05-01 from table a
. The second query didn't give the result i expected but the first one did. I thought they were equivalent
select a.user_id
, b.user_id
, a.event_date
, b.event_date
, to_date(a.event_date)
from default.t1 as a
left join stage.t2 as b
on a.user_id = b.user_id
and a.event_date = b.event_date
where a.event_date >= '2017-05-01'
vs.
select a.user_id
, b.user_id
, a.event_date
, b.event_date
, to_date(a.event_date)
from default.t1 as a
left join stage.t2 as b
on a.user_id = b.user_id
and a.event_date = b.event_date
and a.event_date >= '2017-05-01'`