title: HIVE-JOIN ON clause with complex right operand fails
body: <p>I am using HIVE 1.2</p>
  
  <p>TABLE t1:- date_col with DATE datatype
  TABLE t2:- date_col with DATE datatype</p>
  
  <pre><code>SELECT * from t1 inner join t2 ON 
  t1.date_col = CAST(DATE_FORMAT(t2.date_col, 'yyyy-MM-dd HH:mm:ss') AS TIMESTAMP) 
  - INTERVAL '2 01:30:00' DAY TO SECOND
  </code></pre>
  
  <p>This kind of a query fails with the exception :</p>
  
  <pre><code>FAILED: SemanticException '2 01:30:00' encountered with 0 children
  </code></pre>
  
  <p>But when the same ON clause condition is used in WHERE clause it works fine.
  Can anybody point out what it is I am doing wrong?</p>