title: Strange typecast error in sparkSQL.createDataFrame
body: <p>The following code fails:</p>
  
  <pre><code>val RDD = sparkContext.parallelize(Seq(
    Row("123", new java.lang.Integer(456))
  ))
  val schema = StructType(
    StructField("str", StringType) ::
    StructField("dbl", DoubleType) :: Nil
  )
  val df = sqlContext.createDataFrame(RDD, schema)
  df.collect().foreach(println)
  </code></pre>
  
  <p>With this exception:</p>
  
  <pre><code>java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
      at scala.runtime.BoxesRunTime.unboxToDouble(BoxesRunTime.java:119)
      at org.apache.spark.sql.catalyst.expressions.BaseGenericInternalRow$class.getDouble(rows.scala:44)
      at org.apache.spark.sql.catalyst.expressions.GenericInternalRow.getDouble(rows.scala:221)
      ....
  </code></pre>
  
  <p>Please be noted that this is just a test case, in real case type java.lang.Integer is returned from another function so I cannot create Row with unboxed numeric value from scratch.</p>
  
  <p>How to solve this problem?</p>