Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
v2.5.2
-
None
-
None
Description
Hi team:
I found DictionaryManager will pass some dictionaries to DictionaryGenerator to merge them when there is different one among them. But If there are 3 dictionaries
in 3 segments, kylin may don't need to merge Dic1 and Dic1, which won't add same value into new dictionary twice.
If I misunderstand the merge job logic, please feel free to correct me!
Here is the code snapshot at DictionaryManager.java:251
```
boolean identicalSourceDicts = true;
for (int i = 1; i < dicts.size(); ++i) {
if (!dicts.get(0).getDictionaryObject().equals(dicts.get.getDictionaryObject()))
}
if (identicalSourceDicts)
{ logger.info("Use one of the merging dictionaries directly"); return dicts.get(0); }else
{ Dictionary<String> newDict = DictionaryGenerator.mergeDictionaries(DataType.getType(newDictInfo.getDataType()), dicts); return trySaveNewDict(newDict, newDictInfo); }```