core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
/**
   * Below method will be used to get the list of values in
   * comma separated string format
   *
   * @param values
   * @return comma separated segment string
   */
Below method will be used to get the list of values in
comma separated string format

@param values
@return comma separated segment string
Below method will be used to get the list of values in comma separated string format @param values @return comma separated segment string
public static String convertToString(List<String> values) {
    if (values == null || values.isEmpty()) {
      return "";
    }
    StringBuilder segmentStringbuilder = new StringBuilder();
    for (int i = 0; i < values.size() - 1; i++) {
      String segmentNo = values.get(i);
      segmentStringbuilder.append(segmentNo);
      segmentStringbuilder.append(",");
    }
    segmentStringbuilder.append(values.get(values.size() - 1));
    return segmentStringbuilder.toString();
  }
public static String convertToString ( List < String > values ) { if ( values == null || values . isEmpty ( ) ) { return "" ; } StringBuilder segmentStringbuilder = new StringBuilder ( ) ; for ( int i = 0 ; i < values . size ( ) - 1 ; i ++ ) { String segmentNo = values . get ( i ) ; segmentStringbuilder . append ( segmentNo ) ; segmentStringbuilder . append ( "," ) ; } segmentStringbuilder . append ( values . get ( values . size ( ) - 1 ) ) ; return segmentStringbuilder . toString ( ) ; }
Below method will be used to get the list of values in
 comma separated string format
Below method will be used to get the list of values in comma separated string format