title: Spark SQL saveAsTable is not compatible with Hive when partition is specified
body: <p>Kind of edge case, when saving parquet table in Spark SQL with partition,  </p>
  
  <pre><code>#schema definitioin
  final StructType schema = DataTypes.createStructType(Arrays.asList(
      DataTypes.createStructField("time", DataTypes.StringType, true),
      DataTypes.createStructField("accountId", DataTypes.StringType, true),
      ...
  
  DataFrame df = hiveContext.read().schema(schema).json(stringJavaRDD);
  
  df.coalesce(1)
      .write()
      .mode(SaveMode.Append)
      .format("parquet")
      .partitionBy("year")
      .saveAsTable("tblclick8partitioned");
  </code></pre>
  
  <p>Spark warns:</p>
  
  <blockquote>
    <p>Persisting partitioned data source relation into Hive metastore in
    Spark SQL specific format, which is NOT compatible with Hive</p>
  </blockquote>
  
  <p>In Hive:</p>
  
  <pre><code>hive&gt; describe tblclick8partitioned;
  OK
  col                     array&lt;string&gt;           from deserializer
  Time taken: 0.04 seconds, Fetched: 1 row(s)
  </code></pre>
  
  <p>Obviously the schema is not correct - however if I use <code>saveAsTable</code> in Spark SQL without partition the table can be queried without problem.</p>
  
  <p>Question is how can I make a parquet table in Spark SQL compatible with Hive with partition info?</p>