nihal0107 commented on a change in pull request #4068:
URL: https://github.com/apache/carbondata/pull/4068#discussion_r551974502



##########
File path: sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java
##########
@@ -121,6 +125,25 @@ private void closeDelete() throws IOException, 
InterruptedException {
     for (Map.Entry<String, Map<String, Set<String>>> path : 
this.filterColumnToValueMappingForDelete
         .entrySet()) {
       deleteExecution(path.getKey());
+      createEmptyMetadataFile(path.getKey());
+    }
+  }
+
+  private void createEmptyMetadataFile(String path) throws IOException {
+    if (!StringUtils.isEmpty(path)) {
+      // Get store path of the table.
+      String schemaFilePath = CarbonTablePath.getSchemaFilePath(path, 
configuration);
+      // If metadata folder exists, it is a transactional table
+      CarbonFile schemaFile = FileFactory.getCarbonFile(schemaFilePath, 
configuration);
+      boolean isTransactionalTable = schemaFile.exists();
+      if (!isTransactionalTable) {

Review comment:
       yeah, you are right, earlier I was thinking about the operation 
performed on the transactional and not transactional table both.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to