title: Spark returns Empty DataFrame but Populated in Hive
body: <p>I have a table in hive</p>
  
  <pre><code>db.table_name
  </code></pre>
  
  <p>When I run the following in hive I get results back</p>
  
  <pre><code>SELECT * FROM db.table_name;
  </code></pre>
  
  <p>When I run the following in a spark-shell </p>
  
  <pre><code>spark.read.table("db.table_name").show
  </code></pre>
  
  <p>It shows nothing. Similarly </p>
  
  <pre><code>sql("SELECT * FROM db.table_name").show
  </code></pre>
  
  <p>Also shows nothing. Selecting arbitrary columns out before the show also displays nothing. Performing a count states the table has 0 rows.</p>
  
  <p>Running the same queries works against other tables in the same database.</p>
  
  <p>Spark Version: 2.2.0.cloudera1</p>
  
  <p>The table is created using</p>
  
  <pre><code>table.write.mode(SaveMode.Overwrite).saveAsTable("db.table_name")
  </code></pre>
  
  <p>And if I read the file using the parquet files directly it works.</p>
  
  <pre><code>spark.read.parquet(&lt;path-to-files&gt;).show
  </code></pre>
  
  <p>EDIT:
  I'm currently using a workaround by describing the table and getting the location and using spark.read.parquet.</p>