I am trying to perform a left outer join on 2 tables in Hive. The join condition here involves a LIKE operator. This is the query that I am trying to execute:
SELECT *
FROM a
LEFT OUTER JOIN
(SELECT *
FROM b
WHERE class = 'ex') ON b.mo LIKE CONCAT(a.device_name ,'%')
AND a.time_stamp BETWEEN to_utc_timestamp(from_unixtime(cast(b.first_time AS BIGINT) - 660), "z")
AND to_utc_timestamp(from_unixtime(cast(b.first_time AS BIGINT) + 60),"z")
When I execute this query, I get an error
Both left and right aliases encountered in JOIN ''%''
The aim here to perform a left outer join on the tables a and b on the given conditions i.e. based on the device name and time_stamp.
If someone could help me out with this, I would really appreciate it.