title: Spark write to Hive mistaken table_name as Partition spec and throws "Partition spec contains non-partition columns" error
body: <p>My Hive table was defined with <code>PARTITIONED BY (ds STRING, model STRING)</code>
  And when writing to the table in PySpark, I did </p>
  
  <pre><code>output_df
    .repartition(250)
    .write
    .mode('overwrite')
    .format('parquet')\
    .partitionBy('ds', 'model')\
    .saveAsTable('{table_schema}.{table_name}'.format(table_schema=table_schema, 
    table_name=table_name))
  </code></pre>
  
  <p>However I encountered the following error:</p>
  
  <pre><code>org.apache.hadoop.hive.ql.metadata.Table.ValidationFailureSemanticException: Partition spec {ds=2019-10-06, model=p1kr, table_name=drv_projection_table} contains non-partition columns
  </code></pre>
  
  <p>It seems Spark or Hive mistaken <code>table_name</code> as a partition. My S3 path for the table is <code>s3://some_path/qubole/table_name=drv_projection_table</code>, but <code>table_name</code> wasn't specified as part of the partition.  </p>