We have a query similar to the below: (partition_date is our tables partition)
SELECT * FROM A
JOIN B
where partition_date > B.last_runtime;
We realized that by placing the condition in the where clause it is causing a full table scan so we need to place it in the JOIN as an ON.
The problem with this is Hive does not support inequality joins so was thinking of using BETWEEN operator like the below:
Select * from A
JOIN B ON par_date between B.last_runtime and '99999999';
this is giving us the error: Both left and right aliases encountered in JOIN ''99999999''
If I replace B.last_runtime with an actual value, say '20160310' it works okay...
any ideas? Thanks in advance