Description
Wrong usage of cache in org.apache.kylin.metadata.datatype.DataType#getType.
public static DataType getType(String type) { if (type == null) return null; DataType dataType = new DataType(type); // <-- Always new DataType cached = CACHE.get(dataType); // already has dataType why fetch it from cache? if (cached == null) { CACHE.put(dataType, dataType); // <-- Seed cache cached = dataType; } return cached; }
Attachments
Issue Links
- links to