Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/12801#discussion_r62108004
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala ---
@@ -400,6 +400,10 @@ case class AlterTableDropPartition(
throw new AnalysisException(
"ALTER TABLE DROP PARTITIONS is not allowed for tables defined
using the datasource API")
}
+ if (specs.size > 1) {
+ throw new AnalysisException(
+ s"Alter Table Drop Partition is not allowed to drop more than one
partitions.")
--- End diff --
I see, now we throw an exception here to disallow multiple partitions. So
why does this class even take in a sequence of specs int he first place? It
should just take in a single spec. We should throw the exception in the parser
so the code downstream can be cleaner.
---
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]