carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] incubator-carbondata pull request #635: [CARBONDATA-782]support SORT_COLUMNS
Date Sun, 19 Mar 2017 10:14:06 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message