title: Comparing Similar Hive Tables
body: <p>I have two hive tables (t1 and t2) that I would like to compare. The second table has 5 additional columns that are not in the first table. Other than the five disjoint fields, the two tables should be identical. I am trying to write a query to check this. Here is what I have so far:</p>
  
  <pre><code>SELECT * FROM t1 
  UNION ALL
  select * from t2
  GROUP BY some_value
  HAVING count(*) == 2
  </code></pre>
  
  <p>If the tables are identical, this should return 0 records. However, since the second table contains 5 extra fields, I need to change the second select statement to reflect this. There are almost 60 column names so I would really hate to write it like this:</p>
  
  <pre><code>SELECT * FROM t1 
  UNION ALL
  select field1, field2, field3,...,fieldn from t2
  GROUP BY some_value
  HAVING count(*) == 2
  </code></pre>
  
  <p>I have looked around and I know there is no <code>select * EXCEPT</code> syntax, but is there a way to do this query without having to explicity name each column that I want included in the final result?</p>