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

Wang Cheng commented on KYLIN-1788:
-----------------------------------

Essentially it is not a bug but a strategy problem.  Of course it can be solved 
by tuning the threshold "maxSize", however, it's difficult to get an 
appropriate size. 

A compromise proposal is to count "mandatoryDims.size()" as 1 if its size isn't 
zero:

{code:java}
int mandatorySize = mandatoryDims.size() > 0 ? 1 : 0 ;

if ( mandatorySize + normalDimSize + hierarchySize + jointSize > maxSize) {
         context.addResult(ResultLevel.ERROR, "Aggregation group " + index + " 
has too many dimensions");
         continue;
 }
{code}

> Allow arbitrary number of mandatory dimensions in one aggregation group 
> ------------------------------------------------------------------------
>
>                 Key: KYLIN-1788
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1788
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v1.5.2
>            Reporter: hongbin ma
>            Assignee: hongbin ma
>
> To prevent one aggregation group containing too many combinations we apply a 
> check
> {code:java}
> if (mandatoryDims.size() + normalDimSize + hierarchySize + jointSize > 
> maxSize) {
>                 context.addResult(ResultLevel.ERROR, "Aggregation group " + 
> index + " has too many dimensions");
>                 continue;
>             }
> {code}
> however the formular fails to take into account the case where there're many 
> mandatory dimensions. For example, if we have 50 dimensions in a cube and we 
> only need the base cuboid, then what we want is a single  aggregation group 
> containing all the dimensions, each of them being a mandatory. 
> since mandatory dimensions are more "encouraged", I suggest to remove 
> counting mandatory dimensions in the formula. the revised code will be:
> {code:java}
> if (normalDimSize + hierarchySize + jointSize > maxSize) {
>                 context.addResult(ResultLevel.ERROR, "Aggregation group " + 
> index + " has too many dimensions");
>                 continue;
>             }
> {code}



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

Reply via email to