Indhumathi27 commented on a change in pull request #3811:
URL: https://github.com/apache/carbondata/pull/3811#discussion_r448251601



##########
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/command/SICreationCommand.scala
##########
@@ -390,8 +391,15 @@ private[sql] case class CarbonCreateSecondaryIndexCommand(
       }
       val indexTablePath = CarbonTablePath
         
.getMetadataPath(tableInfo.getOrCreateAbsoluteTableIdentifier.getTablePath)
+      val metaPathMainTbl: String = carbonTable.getMetadataPath

Review comment:
       If metaPathMainTbl and  metaPathSI variable used in one place only, can 
replace with  
`SegmentStatusManager.readLoadMetadata(carbonTable.getMetadataPath)`

##########
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SILoadEventListenerForFailedSegments.scala
##########
@@ -78,20 +78,29 @@ class SILoadEventListenerForFailedSegments extends 
OperationEventListener with L
                   .getTableMetadata(TableIdentifier(indexTableName,
                     Some(carbonLoadModel.getDatabaseName))).storage.properties
                   .getOrElse("isSITableEnabled", "true").toBoolean
+                val indexTable = metaStore
+                  .lookupRelation(Some(carbonLoadModel.getDatabaseName), 
indexTableName)(
+                    sparkSession)
+                  .asInstanceOf[CarbonRelation]
+                  .carbonTable
 
-                if (!isLoadSIForFailedSegments) {
+                val metaPathMainTbl: String = carbonTable.getMetadataPath
+                val listOfLoadFolderDetailsArrayMainTbl: 
Array[LoadMetadataDetails] =

Review comment:
       Handle Same as above comment




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