title: Caching tables in Spark SQL
body: <p>I'm using Spark SQL and would like to cache a table that was originally created in Hive.  This works fine if the table is in Hive's default database, e.g.</p>
  
  <pre><code>CACHE TABLE test1;
  </code></pre>
  
  <p>However, if it is in a different database, e.g. <code>myDB</code> then I cannot do</p>
  
  <pre><code>CACHE TABLE myDB.test1;
  </code></pre>
  
  <p>since Spark complains that <code>failure: ``as'' expected but</code>.' found`.</p>
  
  <p>I can however access and query the table, for instance by running</p>
  
  <pre><code>SELECT * FROM myDB.test1;
  </code></pre>
  
  <p>Is there a way round this?</p>