VenuReddy2103 commented on a change in pull request #4110:
URL: https://github.com/apache/carbondata/pull/4110#discussion_r609292526
##########
File path:
core/src/main/java/org/apache/carbondata/core/index/secondaryindex/CarbonCostBasedOptimizer.java
##########
@@ -15,15 +15,49 @@
* limitations under the License.
*/
-package org.apache.spark.sql.secondaryindex.optimizer;
+package org.apache.carbondata.core.index.secondaryindex;
+import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.index.IndexType;
+import org.apache.carbondata.core.metadata.schema.indextable.IndexMetadata;
+import org.apache.carbondata.core.metadata.schema.table.TableInfo;
+
public class CarbonCostBasedOptimizer {
+ public static Map<String, List<String>> getSecondaryIndexes(TableInfo
tableInfo) {
+ Map<String, List<String>> indexes = new HashMap();
+ String indexMeta =
+
tableInfo.getFactTable().getTableProperties().get(tableInfo.getFactTable().getTableId());
+ IndexMetadata indexMetadata = null;
+ if (null != indexMeta) {
+ try {
+ indexMetadata = IndexMetadata.deserialize(indexMeta);
+ } catch (IOException e) {
+ e.printStackTrace();
Review comment:
added
--
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:
[email protected]