Github user mallman commented on the issue:
https://github.com/apache/spark/pull/15566
I went through the script I wrote for
https://issues.apache.org/jira/browse/SPARK-17990. At the point where I ran
```
(0 to 9).foreach { p => sql(s"alter table mixed_case_partitioning add
partition(partCol=$p)") }
```
I got an exception:
```
org.apache.spark.sql.AnalysisException: Partition spec is invalid. The spec
(partCol) must match the partition spec (partcol) defined in table
'`default`.`mixed_case_partitioning`';
at
org.apache.spark.sql.catalyst.catalog.SessionCatalog$$anonfun$requireExactMatchedPartitionSpec$1.apply(SessionCatalog.scala:768)
at
org.apache.spark.sql.catalyst.catalog.SessionCatalog$$anonfun$requireExactMatchedPartitionSpec$1.apply(SessionCatalog.scala:766)
at
scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at
org.apache.spark.sql.catalyst.catalog.SessionCatalog.requireExactMatchedPartitionSpec(SessionCatalog.scala:766)
at
org.apache.spark.sql.catalyst.catalog.SessionCatalog.createPartitions(SessionCatalog.scala:669)
at
org.apache.spark.sql.execution.command.AlterTableAddPartitionCommand.run(ddl.scala:357)
at
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
at
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:56)
at
org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:72)
at
org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
at
org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
at
org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:135)
at
org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
at
org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:132)
at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:113)
at
org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:87)
at
org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:87)
at org.apache.spark.sql.Dataset.<init>(Dataset.scala:183)
at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:62)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:590)
at $anonfun$1.apply(<console>:24)
at $anonfun$1.apply(<console>:24)
at scala.collection.immutable.Range.foreach(Range.scala:160)
... 48 elided
```
While this PR is not a fix, I'd call this an improvement on the previous
behavior which would silently do the wrong thing.
---
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]