Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1812#discussion_r162245791
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
 ---
    @@ -441,6 +452,30 @@ public int compare(LoadMetadataDetails seg1, 
LoadMetadataDetails seg2) {
         });
       }
     
    +  /**
    +   * This method will return the list of loads which are specified by user 
in SQL.
    +   *
    +   * @param listOfSegmentsLoadedInSameDateInterval
    +   * @param segmentIds
    +   * @return
    +   */
    +  private static List<LoadMetadataDetails> 
identitySegmentsToBeMergedBasedOnSpecifiedSegments(
    +          List<LoadMetadataDetails> listOfSegmentsLoadedInSameDateInterval,
    +          Set<String> segmentIds) {
    +    List<LoadMetadataDetails> listOfSegmentsSpecified =
    +            new ArrayList<>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
    +    if (segmentIds != null && segmentIds.size() != 0) {
    +      for (LoadMetadataDetails detail : 
listOfSegmentsLoadedInSameDateInterval) {
    +        if (isSegmentValid(detail) && 
segmentIds.contains(detail.getLoadName())) {
    --- End diff --
    
    If the specified segment is not valid, better throw exception about invalid 
segments instead of ignoring it


---

Reply via email to