Github user lion-x commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/219#discussion_r85255469
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/surrogatekeysgenerator/csvbased/CarbonCSVBasedSeqGenStep.java
 ---
    @@ -470,6 +474,36 @@ 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(",");
    +          for (String dateFormat:dateformats) {
    +            String[] dateFormatSplits = dateFormat.split(":", 2);
    +            
dateformatsHashMap.put(dateFormatSplits[0],dateFormatSplits[1]);
    +            // TODO  verify the dateFormatSplits is valid or not
    +          }
    +        }
    +        directDictionaryGenerators =
    +                new 
DirectDictionaryGenerator[meta.getDimensionColumnIds().length];
    +        for (int i = 0; i < meta.getDimensionColumnIds().length; i++) {
    +          ColumnSchemaDetails columnSchemaDetails = 
columnSchemaDetailsWrapper.get(
    +                  meta.getDimensionColumnIds()[i]);
    +          if (columnSchemaDetails.isDirectDictionary()) {
    +            if 
(dateformatsHashMap.containsKey(columnSchemaDetails.getColumnName())) {
    +              directDictionaryGenerators[i] =
    +                      
DirectDictionaryKeyGeneratorFactory.getDirectDictionaryGenerator(
    +                              columnSchemaDetails.getColumnType(),
    +                              
dateformatsHashMap.get(columnSchemaDetails.getColumnName()));
    +            } else {
    +              String dateFormat = CarbonProperties.getInstance()
    +                      
.getProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT,
    +                              
CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT);
    +              directDictionaryGenerators[i] =
    +                      
DirectDictionaryKeyGeneratorFactory.getDirectDictionaryGenerator(
    +                              columnSchemaDetails.getColumnType(), 
dateFormat);
    --- End diff --
    
    OK


---
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