Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1464#discussion_r148995569
--- Diff:
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DataMapSchema.java
---
@@ -116,6 +218,83 @@ public void setProperties(Map<String, String>
properties) {
String value = in.readUTF();
this.properties.put(key, value);
}
+ }
+ /**
+ * Below method will be used to get the columns on which aggregate
function is not applied
+ * @param columnName
+ * parent column name
+ * @return child column schema
+ */
+ public ColumnSchema getChildColBasedByParentForNonAggF(String
columnName) {
+ Set<ColumnSchema> columnSchemas =
parentToNonAggChildMapping.get(columnName);
+ if (null != columnSchemas) {
+ Iterator<ColumnSchema> iterator = columnSchemas.iterator();
+ while (iterator.hasNext()) {
+ ColumnSchema next = iterator.next();
+ if (null == next.getAggFunction() ||
next.getAggFunction().isEmpty()) {
+ return next;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Below method will be used to get the column schema based on parent
column name
+ * @param columName
+ * parent column name
+ * @return child column schmea
+ */
+ public ColumnSchema getChildColumnByParentName(String columName) {
--- End diff --
better name as `getChildColumnByParentColName'
---