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 2019/10/21 20:46:27 UTC

[GitHub] [spark] rdblue commented on a change in pull request #26174: [SPARK-29517][SQL] TRUNCATE TABLE should look up catalog/table like v2 commands

rdblue commented on a change in pull request #26174: [SPARK-29517][SQL] TRUNCATE TABLE should look up catalog/table like v2 commands
URL: https://github.com/apache/spark/pull/26174#discussion_r337231188
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
 ##########
 @@ -282,6 +282,12 @@ class ResolveSessionCatalog(
       AlterTableRecoverPartitionsCommand(
         v1TableName.asTableIdentifier,
         "MSCK REPAIR TABLE")
+
+    case TruncateTableStatement(tableName, partitionSpec) =>
 
 Review comment:
   No. This is not a catalog operation, it is a table operation. We already have 2 ways to truncate a table: if the table implements `SupportsTruncate` or `SupportsOverwrite`. A truncate command should build a write and commit without any commit messages.
   
   We can also add a short-cut trait on `Table` to avoid the builder.

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


With regards,
Apache Git Services

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