Posted by
GitBox on
Dec 01, 2020; 3:41pm
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-nihal0107-opened-a-new-pull-request-4015-Handled-insert-overwrite-scenario-for-SI-tp103311p103952.html
akashrn5 commented on a change in pull request #4015:
URL:
https://github.com/apache/carbondata/pull/4015#discussion_r533511617##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/rdd/SecondaryIndexCreator.scala
##########
@@ -398,6 +404,28 @@ object SecondaryIndexCreator {
secondaryIndexModel.sqlContext.sparkSession,
carbonLoadModelForMergeDataFiles.getFactTimeStamp,
rebuiltSegments)
+
+ if (isInsertOverwrite) {
+ var staleSegmentsList = new ListBuffer[String]()
+ SegmentStatusManager
+ .readLoadMetadata(indexCarbonTable.getMetadataPath).foreach { loadMetadata =>
+ if (!successSISegments.contains(loadMetadata.getLoadName)) {
Review comment:
you can use directly filter instead of creating new buffer
----------------------------------------------------------------
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:
[hidden email]