/** * This method will get the value for the given key. If value does not exist * for the given key, it will check and load the value. * * @param dictionaryColumnUniqueIdentifier unique identifier which contains dbName, * tableName and columnIdentifier * @return dictionary * @throws IOException in case memory is not sufficient to load dictionary into memory */ private Dictionary getDictionary( DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier) throws IOException { Dictionary forwardDictionary = null; // dictionary is only for primitive data type assert (!dictionaryColumnUniqueIdentifier.getDataType().isComplexType()); String columnIdentifier = dictionaryColumnUniqueIdentifier.getColumnIdentifier().getColumnId(); ColumnDictionaryInfo columnDictionaryInfo = getColumnDictionaryInfo(dictionaryColumnUniqueIdentifier, columnIdentifier); // load sort index file in case of forward dictionary checkAndLoadDictionaryData(dictionaryColumnUniqueIdentifier, columnDictionaryInfo, getLruCacheKey(dictionaryColumnUniqueIdentifier.getColumnIdentifier().getColumnId(), CacheType.FORWARD_DICTIONARY), true); forwardDictionary = new ForwardDictionary(columnDictionaryInfo); return forwardDictionary; }