Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/219#discussion_r85632892
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenStep.java
 ---
    @@ -470,6 +472,34 @@ public boolean processRow(StepMetaInterface smi, 
StepDataInterface sdi) throws K
                   break;
               }
             }
    +        HashMap<String, String> dateformatsHashMap = new HashMap<String, 
String>();
    +        if (meta.dateFormat != null) {
    +          String[] dateformats = 
meta.dateFormat.split(CarbonCommonConstants.COMMA);
    +          for (String dateFormat:dateformats) {
    +            String[] dateFormatSplits = dateFormat.split(":", 2);
    +            
dateformatsHashMap.put(dateFormatSplits[0].toLowerCase().trim(),
    +                dateFormatSplits[1].trim());
    +          }
    +        }
    +        String[] DimensionColumnIds = meta.getDimensionColumnIds();
    +        directDictionaryGenerators =
    +            new DirectDictionaryGenerator[DimensionColumnIds.length];
    +        for (int i = 0; i < DimensionColumnIds.length; i++) {
    +          ColumnSchemaDetails columnSchemaDetails = 
columnSchemaDetailsWrapper.get(
    +              DimensionColumnIds[i]);
    +          if (columnSchemaDetails.isDirectDictionary()) {
    +            String columnName = columnSchemaDetails.getColumnName();
    +            DataType columnType = columnSchemaDetails.getColumnType();
    +            if (dateformatsHashMap.containsKey(columnName)) {
    --- End diff --
    
    better to use "get" method, just look up map once.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to