title: spark - scala - How can I check if a table exists in hive
body: <p>I have to check whether a table exists in hive using spark(1.6.2) scala</p>
  
  <p>If it doesn't I have to create an empty dataframe and save that as a hive table.</p>
  
  <p>If it exists, then overwrite the existing table.</p>
  
  <p>I need a function that returns boolean based on which I could take the above mentioned decisions(of whether to create new table or overwrite existing one)</p>