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

    https://github.com/apache/carbondata/pull/2113#discussion_r181629595
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/datamap/DataMapStoreManager.java 
---
    @@ -246,17 +247,24 @@ public TableDataMap getDataMap(CarbonTable table, 
DataMapSchema dataMapSchema) {
       public TableDataMap createAndRegisterDataMap(CarbonTable table,
           DataMapSchema dataMapSchema) throws 
MalformedDataMapCommandException, IOException {
         DataMapFactory dataMapFactory;
    -    try {
    -      // try to create datamap by reflection to test whether it is a valid 
DataMapFactory class
    -      Class<? extends DataMapFactory> factoryClass =
    -          (Class<? extends DataMapFactory>) 
Class.forName(dataMapSchema.getProviderName());
    -      dataMapFactory = factoryClass.newInstance();
    -    } catch (ClassNotFoundException e) {
    -      throw new MalformedDataMapCommandException(
    -          "DataMap '" + dataMapSchema.getProviderName() + "' not found");
    -    } catch (Throwable e) {
    -      throw new MetadataProcessException(
    -          "failed to create DataMap '" + dataMapSchema.getProviderName() + 
"'", e);
    +    if (dataMapSchema.getProviderName()
    +        .equalsIgnoreCase(DataMapClassProvider.LUCENEFG.getShortName()) || 
dataMapSchema
    +        
.getProviderName().equalsIgnoreCase(DataMapClassProvider.LUCENECG.getShortName()))
 {
    --- End diff --
    
    Why is this special check? why can't it instantiated from old code?


---

Reply via email to