vikramahuja1001 commented on a change in pull request #3659: [CARBONDATA-3738]
: Delete seg. by ID is displaying as failed with invalid ID upon deleting a
added parquet segment.
URL: https://github.com/apache/carbondata/pull/3659#discussion_r403964131
##########
File path:
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala
##########
@@ -93,7 +93,14 @@ case class CarbonAddLoadCommand(
// If a path is already added then we should block the adding of the same
path again.
val allSegments =
SegmentStatusManager.readLoadMetadata(carbonTable.getMetadataPath)
- if (allSegments.exists(a => a.getPath != null &&
a.getPath.equalsIgnoreCase(inputPath))) {
+ // If the segment has been already loaded from the same path and its
status is SUCCESS or
+ // PARTIALLY_SUCCESS, throw an exception as we should block the adding of
the same path again.
+ if (allSegments.exists(a => a.getPath != null &&
a.getPath.equalsIgnoreCase(inputPath) &&
+ (a.getSegmentStatus.getMessage
+
.equalsIgnoreCase(SegmentStatus.SUCCESS.toString) ||
Review comment:
done
----------------------------------------------------------------
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