kangpinghuang commented on a change in pull request #1917: Support specifying
inverted index columns when creating table
URL: https://github.com/apache/incubator-doris/pull/1917#discussion_r350600678
##########
File path: fe/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java
##########
@@ -371,4 +377,38 @@ public static long analyzeTimeout(Map<String, String>
properties, long defaultTi
}
return timeout;
}
+
+ public static Set<String> analyzeInvertedIndex(Map<String, String>
properties,
+ List<Column> columns)
throws AnalysisException {
+ if (properties == null ||
!properties.containsKey(PROPERTIES_INVERTED_INDEX_COLUMNS)) {
+ return Sets.newHashSet();
+ }
+ String idxColsStr = properties.get(PROPERTIES_INVERTED_INDEX_COLUMNS);
+ properties.remove(PROPERTIES_INVERTED_INDEX_COLUMNS);
+ if (Strings.isNullOrEmpty(idxColsStr)) {
+ return Sets.newHashSet();
+ }
+ Set<String> resultCols = Sets.newHashSet();
+ Map<String, Column> columnMap = columns.stream()
+ .collect(Collectors.toMap(col -> col.getName().toLowerCase(),
Function.identity()));
+
+ List<String> idxCols =
COMMA_SPLITTER.splitToList(idxColsStr.toLowerCase());
Review comment:
I think this List is name, not idx, So I think colNames is a better name.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]