Joint could not be used in the hierarchy.

Joint means treating multiple dimensions as one: they either all appeared,
either all not; It is a conflict with hierarchy.

2017-11-16 21:29 GMT+08:00 doom <[email protected]>:

> HI ALL:
> I read the src code of kylin 2.2, and find:
>
> In class CubeDes, if hierarchyDims contain jointDims will throw exception.
> public void validateAggregationGroups() {
>     ...
>     if (CollectionUtils.containsAny(hierarchyDims, jointDims)) {
>                 logger.error("Aggregation group " + index + " hierarchy
> dimensions overlap with joint dimensions");
>                 throw new IllegalStateException(
>                         "Aggregation group " + index + " hierarchy
> dimensions overlap with joint dimensions: "
>                                 + 
> ensureOrder(CollectionUtils.intersection(hierarchyDims,
> jointDims)));
> }
>
> But in class AggregationGroup will replace the hierarchy dim with the
> joint dims witch contain it.
> private void buildHierarchyMasks(RowKeyDesc rowKeyDesc) {
>             .....
>             for (int i = 0; i < hierarchy_dims.length; i++) {
>                 TblColRef hColumn = cubeDesc.getModel().
> findColumn(hierarchy_dims[i]);
>                 Integer index = rowKeyDesc.getColumnBitIndex(hColumn);
>                 long bit = 1L << index;
>
>                 // combine joint as logic dim
>                 if (dim2JointMap.get(bit) != null) {
>                     bit = dim2JointMap.get(bit);
>                 }
>
>                 mask.fullMask |= bit;
>                 allMaskList.add(mask.fullMask);
>                 dimList.add(bit);
>             }
> }
>
> do i understand in a wrong way?
>
>
>


-- 
Best regards,

Shaofeng Shi 史少锋

Reply via email to