Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2254#discussion_r185427135
--- Diff:
core/src/main/java/org/apache/carbondata/core/datamap/dev/DataMapFactory.java
---
@@ -27,74 +29,124 @@
import org.apache.carbondata.core.features.TableOperation;
import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
import org.apache.carbondata.core.metadata.schema.table.DataMapSchema;
+import
org.apache.carbondata.core.metadata.schema.table.column.CarbonColumn;
import org.apache.carbondata.events.Event;
+import org.apache.commons.lang.StringUtils;
+
/**
- * Interface for datamap factory, it is responsible for creating the
datamap.
+ * Interface for datamap of index type, it is responsible for creating the
datamap.
*/
-public interface DataMapFactory<T extends DataMap> {
+public abstract class DataMapFactory<T extends DataMap> {
+
+ public static final String INDEX_COLUMNS = "INDEX_COLUMNS";
+ protected CarbonTable carbonTable;
+
+ public DataMapFactory(CarbonTable carbonTable) {
+ this.carbonTable = carbonTable;
+ }
/**
* Initialization of Datamap factory with the carbonTable and datamap
name
*/
- void init(CarbonTable carbonTable, DataMapSchema dataMapSchema)
+ public abstract void init(DataMapSchema dataMapSchema)
--- End diff --
Why init is required for abstract class, Better pass schema also to the
constructor and remove this method.
---