You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/06/22 17:43:06 UTC

[GitHub] [incubator-pinot] siddharthteotia commented on a change in pull request #5573: Truncate API added

siddharthteotia commented on a change in pull request #5573:
URL: https://github.com/apache/incubator-pinot/pull/5573#discussion_r443724374



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
##########
@@ -341,6 +344,46 @@ public SuccessResponse updateTableConfig(
 
     return new SuccessResponse("Table config updated for " + tableName);
   }
+  
+  @POST

Review comment:
       Can we please add documentation highlighting the differences between this and table drop?
   
   Generally, the standard implemented by other databases has the following distinction:
   
   DROP will delete table data, indexes, metadata etc. So any statement (to fetch data or query metadata) will fail stating "table does not exist"
   
   TRUNCATE will delete table data, indexes, but the metadata will be kept around. So you can still see table's schema, table config etc and the queries will return empty results AFAIK.
   
   Are we following the same distinction? If so, we should update the docs to state when should the user choose DROP vs TRUNCATE.
   
   Also, we should add tests to ensure that both behave expectedly. If TRUNCATE is not expected to delete config and schema, then we should add a test for 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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org