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

    https://github.com/apache/carbondata/pull/2652#discussion_r213945210
  
    --- Diff: 
store/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonWriterBuilder.java 
---
    @@ -259,14 +259,23 @@ public CarbonWriterBuilder 
withLoadOptions(Map<String, String> options) {
               !option.equalsIgnoreCase("complex_delimiter_level_1") &&
               !option.equalsIgnoreCase("complex_delimiter_level_2") &&
               !option.equalsIgnoreCase("quotechar") &&
    -          !option.equalsIgnoreCase("escapechar")) {
    +          !option.equalsIgnoreCase("escapechar") &&
    +          !option.equalsIgnoreCase("sort_scope")) {
             throw new IllegalArgumentException("Unsupported options. "
                 + "Refer method header or documentation");
           }
         }
     
         // convert it to treeMap as keys need to be case insensitive
         Map<String, String> optionsTreeMap = new 
TreeMap<>(String.CASE_INSENSITIVE_ORDER);
    +    if (options.containsKey("sort_scope")) {
    +      String sortScope = options.get("sort_scope");
    +      if (!((sortScope.equalsIgnoreCase("local_sort")) ||
    +          (sortScope.equalsIgnoreCase("batch_sort"))
    +          || (sortScope.equalsIgnoreCase("no_sort")))) {
    +        throw new IllegalArgumentException("Invalid Sort Scope Option");
    --- End diff --
    
    add the sortScope in the message also


---

Reply via email to