Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1626#discussion_r155264101
--- Diff:
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/AggregationDataMapSchema.java
---
@@ -74,7 +86,49 @@ public ColumnSchema
getNonAggChildColBasedByParent(String columnName) {
Iterator<ColumnSchema> iterator = columnSchemas.iterator();
while (iterator.hasNext()) {
ColumnSchema next = iterator.next();
- if (null == next.getAggFunction() ||
next.getAggFunction().isEmpty()) {
+ if ((null == next.getAggFunction() ||
next.getAggFunction().isEmpty()) && null == next
+ .getTimeSeriesFunction() ||
next.getTimeSeriesFunction().isEmpty()) {
+ return next;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * 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 getNonAggNonTimeChildColBasedByParent(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 columns on which aggregate
function is not applied
--- End diff --
change description
---