ajantha-bhat commented on a change in pull request #3688: [CARBONDATA-3765] 
Refactor Index Metadata for CG and FG Indexes
URL: https://github.com/apache/carbondata/pull/3688#discussion_r405272670
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/index/IndexChooser.java
 ##########
 @@ -68,15 +67,14 @@
   public IndexChooser(CarbonTable carbonTable) throws IOException {
     this.carbonTable = carbonTable;
     // read all indexes for this table and populate CG and FG index list
-    List<TableIndex> visibleIndexes =
-        DataMapStoreManager.getInstance().getAllVisibleIndexes(carbonTable);
-    Map<String, DataMapStatusDetail> map = 
DataMapStatusManager.readDataMapStatusMap();
+    List<TableIndex> visibleIndexes = carbonTable.getAllVisibleIndexes();
     cgIndexes = new ArrayList<>(visibleIndexes.size());
     fgIndexes = new ArrayList<>(visibleIndexes.size());
     for (TableIndex visibleIndex : visibleIndexes) {
-      DataMapStatusDetail status = 
map.get(visibleIndex.getDataMapSchema().getDataMapName());
-      if (status != null && status.isEnabled()) {
-        IndexLevel level = visibleIndex.getIndexFactory().getDataMapLevel();
+      if 
(visibleIndex.getIndexSchema().getProperties().get(CarbonCommonConstants.INDEX_STATUS)
 
 Review comment:
   How do you handle the compatibility during upgrade ? 1.6 already wrote in 
system folder. Once upgraded. Table will not have these properties.

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

Reply via email to