You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/02/25 07:08:51 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #31637: [SPARK-34524][SQL] Simplify v2 partition commands resolution

cloud-fan commented on a change in pull request #31637:
URL: https://github.com/apache/spark/pull/31637#discussion_r582590874



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -1009,35 +1005,4 @@ trait CheckAnalysis extends PredicateHelper with LookupCatalog {
       case _ =>
     }
   }
-
-  // Make sure that the `SHOW PARTITIONS` command is allowed for the table
-  private def checkShowPartitions(showPartitions: ShowPartitions): Unit = showPartitions match {
-    case ShowPartitions(rt: ResolvedTable, _, _)
-        if !rt.table.isInstanceOf[SupportsPartitionManagement] =>
-      failAnalysis("SHOW PARTITIONS cannot run for a table which does not support partitioning")
-    case ShowPartitions(ResolvedTable(_, _, partTable: SupportsPartitionManagement, _), _, _)
-        if partTable.partitionSchema().isEmpty =>

Review comment:
       If a `SupportsPartitionManagement` has empty partition schema, `ResolvePartitionSpec` fails earlier when calling `normalizePartitionSpec`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org