Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/635#discussion_r106802856
--- Diff:
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java
---
@@ -153,6 +164,21 @@ public void loadCarbonTable(TableInfo tableInfo) {
tableInfo.getFactTable().getBucketingInfo());
}
+ private void parseSortColumns(TableSchema tableSchema) {
+ Map<String, String> tableProperties = tableSchema.getTableProperties();
+ if (tableProperties != null) {
+ String sortColumnsString =
tableProperties.get(CarbonCommonConstants.SORT_COLUMNS);
+ if (sortColumnsString != null) {
+ numberOfSortColumns = sortColumnsString.split(",").length;
+ for (int i = 0; i < numberOfSortColumns; i++) {
+ if
(!tableSchema.getListOfColumns().get(i).hasEncoding(Encoding.DICTIONARY)) {
+ numberOfNoDictSortColumns++;
--- End diff --
Are you sure that sortcolumns and tableSchema columns are in same order?
I think it is better to check the equals comparison instead of assumption.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---