jackylk commented on a change in pull request #3502: [CARBONATA-3605] Remove global dictionary feature URL: https://github.com/apache/carbondata/pull/3502#discussion_r361798058
########## File path: processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java ########## @@ -98,70 +82,21 @@ public void initialize() throws IOException { configuration.getDataLoadProperty(DataLoadProcessorConstants.IS_EMPTY_DATA_BAD_RECORD) .toString()); List<FieldConverter> fieldConverterList = new ArrayList<>(); - localCaches = new Map[fields.length]; long lruCacheStartTime = System.currentTimeMillis(); - DictionaryClient client = createDictionaryClient(); - dictClients.add(client); for (int i = 0; i < fields.length; i++) { - localCaches[i] = new ConcurrentHashMap<>(); FieldConverter fieldConverter = FieldEncoderFactory.getInstance() - .createFieldEncoder(fields[i], configuration.getTableIdentifier(), i, nullFormat, client, - configuration.getUseOnePass(), localCaches[i], isEmptyBadRecord, - configuration.getParentTablePath(), isConvertToBinary, + .createFieldEncoder(fields[i], i, nullFormat, isEmptyBadRecord, isConvertToBinary, (String) configuration.getDataLoadProperty( CarbonLoadOptionConstants.CARBON_OPTIONS_BINARY_DECODER)); fieldConverterList.add(fieldConverter); } CarbonTimeStatisticsFactory.getLoadStatisticsInstance() .recordLruCacheLoadTime((System.currentTimeMillis() - lruCacheStartTime) / 1000.0); - fieldConverters = fieldConverterList.toArray(new FieldConverter[fieldConverterList.size()]); + fieldConverters = fieldConverterList.toArray(new FieldConverter[0]); Review comment: It is recommended to give 0 size array to `.toArray` func in java ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services