cloud-fan commented on a change in pull request #29339:
URL: https://github.com/apache/spark/pull/29339#discussion_r519941425
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -500,11 +501,17 @@ class ResolveSessionCatalog(
v1TableName.asTableIdentifier,
"ALTER TABLE RECOVER PARTITIONS")
- case AlterTableAddPartitionStatement(tbl, partitionSpecsAndLocs,
ifNotExists) =>
- val v1TableName = parseV1Table(tbl, "ALTER TABLE ADD PARTITION")
+ case AlterTableAddPartition(r @ ResolvedTable(_, _, _: V1Table),
partSpecsAndLocs, ifNotExists)
+ if isSessionCatalog(r.catalog) =>
AlterTableAddPartitionCommand(
- v1TableName.asTableIdentifier,
- partitionSpecsAndLocs,
+ r.identifier.asTableIdentifier,
+ partSpecsAndLocs.asUnresolvedPartitionSpecs.map(spec => (spec.spec,
spec.location)),
+ ifNotExists)
+
+ case AlterTableAddPartition(r: ResolvedView, partSpecsAndLocs,
ifNotExists) =>
Review comment:
We don't need to match this case if you follow my suggestion in
https://github.com/apache/spark/pull/29339/files#r510688469
----------------------------------------------------------------
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]