cloud-fan commented on a change in pull request #31637:
URL: https://github.com/apache/spark/pull/31637#discussion_r582624173
##########
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 =>
- failAnalysis(
- s"SHOW PARTITIONS is not allowed on a table that is not partitioned:
${partTable.name()}")
- case _ =>
- }
-
- private def checkTruncateTable(truncateTable: TruncateTable): Unit =
truncateTable match {
- case TruncateTable(rt: ResolvedTable, None) if
!rt.table.isInstanceOf[TruncatableTable] =>
Review comment:
I have updated the execution part, it will throw proper error instead of
MatchError.
----------------------------------------------------------------
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]