MaxGekk commented on a change in pull request #31499:
URL: https://github.com/apache/spark/pull/31499#discussion_r576708009



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -366,8 +366,12 @@ class ResolveSessionCatalog(val catalogManager: 
CatalogManager)
     case AnalyzeColumn(ResolvedV1TableOrViewIdentifier(ident), columnNames, 
allColumns) =>
       AnalyzeColumnCommand(ident.asTableIdentifier, columnNames, allColumns)
 
-    case RepairTable(ResolvedV1TableIdentifier(ident)) =>
-      AlterTableRecoverPartitionsCommand(ident.asTableIdentifier, "MSCK REPAIR 
TABLE")
+    case RepairTable(ResolvedV1TableIdentifier(ident), addPartitions, 
dropPartitions) =>
+      AlterTableRecoverPartitionsCommand(
+        ident.asTableIdentifier,
+        addPartitions,
+        dropPartitions,
+        "MSCK REPAIR TABLE")

Review comment:
       Unfortunately, we lost the info in `UnresolvedTable` -> `ResolvedTable` 
but we can reconstruct the command name from the flags `addPartitions` and 
`dropPartitions`. Though not the original one because `MSCK REPAIR TABLE table` 
has `addPartitions = true, dropPartitions  = false` can be re-constructed as 
`MSCK REPAIR TABLE table ADD PARTITIONS`. Are you ok with that?




----------------------------------------------------------------
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]

Reply via email to