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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]