vikramahuja1001 commented on a change in pull request #3775:
URL: https://github.com/apache/carbondata/pull/3775#discussion_r467689041



##########
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/index/CarbonCreateIndexCommand.scala
##########
@@ -238,11 +238,22 @@ case class CarbonCreateIndexCommand(
               false)
             val enabledIndexInfo = IndexTableInfo.enableIndex(indexInfo, 
indexModel.indexName)
 
-            // set index information in parent table
-            val parentIndexMetadata = parentTable.getIndexMetadata
-            parentIndexMetadata.updateIndexStatus(indexProviderName,
-              indexModel.indexName,
-              IndexStatus.ENABLED.name())
+            // set index information in parent table. Create it if it is null.
+            val parentIndexMetadata = if (
+              parentTable.getTableInfo.getFactTable.getTableProperties
+                .get(parentTable.getCarbonTableIdentifier.getTableId) != null) 
{

Review comment:
       @kevinjmh , in the case of spark-sql, the same jvm is used between 
driver and executor thus in fallback mode when cache is cleared in executor 
side, the serialized metadata information is also removed from the driver side.




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