You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by jackylk <gi...@git.apache.org> on 2018/08/30 08:30:54 UTC
[GitHub] carbondata pull request #2652: [WIP] Supported Sort Scope for SDK
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2652#discussion_r213945033
--- 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")) ||
--- End diff --
you can use switch case to make it more readable
---