[ 
https://issues.apache.org/jira/browse/KYLIN-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15333225#comment-15333225
 ] 

Vic Wang commented on KYLIN-1790:
---------------------------------

Please check upgradeAggretionGroup in CubeDescUpgrade_v_1_5_1.java


Set<String> visited = newIgnoreCaseSet(null);

        for (String[] group : oldAggGroup) {
            AggregationGroup agg = new AggregationGroup();

            Set<String> remaining = newIgnoreCaseSet(allRowKeyCols);
            remaining.removeAll(visited);

            Set<String> joint = newIgnoreCaseSet(remaining);
            joint.removeAll(oldMandatories);

            Set<String> groupAsSet = newIgnoreCaseSet(null);
            for (String entry : group) {
                groupAsSet.add(entry);
            }
            visited.addAll(groupAsSet);
            joint.removeAll(groupAsSet);


//In the first iteration, it will put *allRowKeyCols* in "includes."  (Should 
*allRowKeyCols* be super set of all old groups here?)

//In the next iternation, it will remove those ones in oldgroup1 , put 
remaining in "includes" 

That will definitely introduced new columns that doesn't exist in any old aggr 
group.

Is that the designed behavior?



> Metadata upgrade tool didn't handle aggregation group joint rule successfully
> -----------------------------------------------------------------------------
>
>                 Key: KYLIN-1790
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1790
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: qianqiaoneng
>            Assignee: Vic Wang
>
> If the total dimension is 10, and aggregation group number is 9. after the 
> metadata upgrade, there would be a joint rule with 10-9=1 dimension. But this 
> definition will cause 
> java.lang.IllegalStateException: Aggregation group 0 require at least 2 dims 
> in a joint
> Should change the upgrade logic not to add joint rule if dimension number is 
> 1.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to