akashrn5 commented on a change in pull request #3493: [CARBONDATA-3600] Fix 
creating mv timeseries UDF column as partition column
URL: https://github.com/apache/carbondata/pull/3493#discussion_r356938336
 
 

 ##########
 File path: 
datamap/mv/core/src/main/scala/org/apache/carbondata/mv/datamap/MVDataMapProvider.scala
 ##########
 @@ -95,8 +95,11 @@ class MVDataMapProvider(
       dataMapSchema.getRelationIdentifier.getTableName,
       true)
     dropTableCommand.processMetadata(sparkSession)
-    DataMapStoreManager.getInstance.unRegisterDataMapCatalog(dataMapSchema)
+    // First, drop datamapschema and unregister datamap from catalog, because 
if in
+    // case, unregister fails, datamapschema will not be deleted from system 
and cannot
+    // create datamap also again
     
DataMapStoreManager.getInstance().dropDataMapSchema(dataMapSchema.getDataMapName)
+    DataMapStoreManager.getInstance.unRegisterDataMapCatalog(dataMapSchema)
 
 Review comment:
   I think if drop datamap schema fails let it fail , no need to unregister, 
because it can valid reason, if we unregister even if it fails later that 
schema file might create problem . @indhumati please check code once and confirm

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


With regards,
Apache Git Services

Reply via email to