title: Impala SQL left join on t1 vs t2
body: <p>I am having a problems with the join here and in specific the on x=y
  IN SQL Impala, can somebody please help me understand how it works. The  <code>SUBSTR(cast(t1.employee_number as string), 3,10) as short_employee_number</code> works fine, I tested that, but as I am building this left join, I do not understand what ultimately should be in the on x=y
  I tried </p>
  
  <pre><code>SUBSTR(cast(t1.employee_number as string), 3,10) =  t2.short_staff_number
  t1.short_employee_number =  t2.short_staff_number
  short_employee_number=  t2.short_staff_number
  </code></pre>
  
  <p>none of which worked. </p>
  
  <p>What is the problem? </p>
  
  <pre><code> SELECT DISTINCT
      SUBSTR(cast(t1.employee_number as string), 3,10) as short_employee_number, 
      t1.begin_date_it0001,
      t1.end_date_it0001,
      t1.cost_center
      t1.position,
      t2.local_time_createddate,
      t2.area,
      t2. unit, 
      t2.short_staff_number, 
      t2.alias, 
      t2.email
  
      FROM dataone  as t1 
      LEFT JOIN datatwo as  t2 
      ON 
      short_employee_number  = t2.short_staff_number ;
  </code></pre>