Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/13880#discussion_r68853188
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
---
@@ -171,14 +171,6 @@ case class InsertIntoHiveTable(
val partitionColumns =
fileSinkConf.getTableInfo.getProperties.getProperty("partition_columns")
val partitionColumnNames =
Option(partitionColumns).map(_.split("/")).getOrElse(Array.empty)
- // By this time, the partition map must match the table's partition
columns
- if (partitionColumnNames.toSet != partition.keySet) {
- throw new SparkException(
- s"""Requested partitioning does not match the ${table.tableName}
table:
- |Requested partitions: ${partition.keys.mkString(",")}
- |Table partitions:
${table.partitionKeys.map(_.name).mkString(",")}""".stripMargin)
- }
-
--- End diff --
If a user is using SQL, he/she can specify the partition columns. So, this
check is still useful (considering that we do not allow to use
DataFrameWriter's partitionBy and insertInto together)?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]