title: Error reading Parquet file with SparkSQL and HiveContext
body: <p>I am trying to read a table from Hive (well, it is Impala) stored in parquet format. I use Spark 1.3.0 and HiveContext.</p>
  
  <p>The schema of the table is:</p>
  
  <pre><code>(a,DoubleType)
  (b,DoubleType)
  (c,IntegerType)
  (d,StringType)
  (e,DecimalType(18,0))
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>val sc = new SparkContext(conf)
  val hc = new HiveContext(sc)
  import hc.implicits._
  import hc.sql
  val df: DataFrame = hc.table(mytable)
  </code></pre>
  
  <p>The trace log error is:</p>
  
  <pre><code>16/03/31 11:33:34 WARN scheduler.TaskSetManager: Lost task 0.0 in stage 0.0 (TID 0, cloudera-smm-2.desa.taiif.aeat): java.lang.ClassCastException: scala.runtime.BoxedUnit cannot be cast to org.apache.spark.sql.types.Decimal
  at org.apache.spark.sql.types.Decimal$DecimalIsFractional$.toDouble(Decimal.scala:330)
  at org.apache.spark.sql.catalyst.expressions.Cast$$anonfun$castToDouble$5.apply(Cast.scala:361)
  at org.apache.spark.sql.catalyst.expressions.Cast$$anonfun$castToDouble$5.apply(Cast.scala:361)
  at org.apache.spark.sql.catalyst.expressions.Cast.eval(Cast.scala:426)
  at org.apache.spark.sql.catalyst.expressions.Alias.eval(namedExpressions.scala:105)
  at org.apache.spark.sql.catalyst.expressions.InterpretedMutableProjection.apply(Projection.scala:68)
  at org.apache.spark.sql.catalyst.expressions.InterpretedMutableProjection.apply(Projection.scala:52)
  at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
  ...
  </code></pre>
  
  <p>It seems that the Decimal format is not being cast properly. Any ideas?</p>