jackylk commented on a change in pull request #3426: [CARBONDATA-3560] Fixed issues for Add Segment
URL:
https://github.com/apache/carbondata/pull/3426#discussion_r341198601
##########
File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala
##########
@@ -92,6 +92,22 @@ case class CarbonAddLoadCommand(
val segmentPath = options.getOrElse(
"path", throw new UnsupportedOperationException("PATH is manadatory"))
+ val format = options.getOrElse("format", "carbondata")
+ val isCarbonFormat = format.equals("carbondata") || format.equals("carbon")
+
+ val allSegments = SegmentStatusManager.readLoadMetadata(carbonTable.getMetadataPath)
+
+ for (currSegment <- allSegments) {
Review comment:
use `allSegments.contains` or `.exist` instead of for
----------------------------------------------------------------
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]
With regards,
Apache Git Services