Github user ravipesala commented on a diff in the pull request: https://github.com/apache/incubator-carbondata/pull/251#discussion_r85270229 --- Diff: processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java --- @@ -304,4 +311,92 @@ public static String getLocalDataFolderLocation(String databaseName, String tabl return ArrayUtils .toPrimitive(noDictionaryMapping.toArray(new Boolean[noDictionaryMapping.size()])); } + + /** + * Preparing the boolean [] to map whether the dimension use inverted index or not. + */ + public static boolean[] getIsUseInvertedIndex(DataField[] fields) { + List<Boolean> isUseInvertedIndexList = new ArrayList<Boolean>(); + for (DataField field : fields) { + if (field.getColumn().isUseInvertedIndnex() && field.getColumn().isDimesion()) { + isUseInvertedIndexList.add(true); + } else if(field.getColumn().isDimesion()){ + isUseInvertedIndexList.add(false); + } + } + return ArrayUtils + .toPrimitive(isUseInvertedIndexList.toArray(new Boolean[isUseInvertedIndexList.size()])); + } + + private static String getComplexTypeString(DataField[] dataFields) { + StringBuilder dimString = new StringBuilder(); + for (int i = 0; i < dataFields.length; i++) { + DataField dataField = dataFields[i]; + if (dataField.getColumn().getDataType().equals(DataType.ARRAY) || dataField.getColumn() + .getDataType().equals(DataType.STRUCT)) { + addAllComplexTypeChildren((CarbonDimension) dataField.getColumn(), dimString, ""); + dimString.append(CarbonCommonConstants.SEMICOLON_SPC_CHARACTER); + } + } + return dimString.toString(); + } + + /** + * This method will return all the child dimensions under complex dimension + * + */ + private static void addAllComplexTypeChildren(CarbonDimension dimension, StringBuilder dimString, + String parent) { + dimString.append( + dimension.getColName() + CarbonCommonConstants.COLON_SPC_CHARACTER + dimension.getDataType() --- End diff -- ok
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---