Re: Can hierarchyDims contain jointDims
Hi Doom, Thank you for reading the code so carefullly. You are welcomed to contribute on this JIRA. 2017-11-19 16:42 GMT+08:00 doom <43535...@qq.com>: > So this issues is work in progress, and result in the two piece contradict > code. thank you for make me clear. > > > -- 原始邮件 -- > *发件人:* "Alberto Ramón"<a.ramonporto...@gmail.com>; > *发送时间:* 2017年11月18日(星期六) 凌晨5:59 > *收件人:* "user"<user@kylin.apache.org>; > *主题:* Re: Can hierarchyDims contain jointDims > > https://issues.apache.org/jira/browse/KYLIN-2149 > > Check this link, you need choose between use one or other > Some times would be great use both together > > On 17 November 2017 at 06:43, doom <43535...@qq.com> wrote: > >> So what's the second code segment mean in AggregationGroup build step? >> is it means replace the hierarchy dim with the joint dims witch contain >> it? >> >> >> -- 原始邮件 -- >> *发件人:* "ShaoFeng Shi";<shaofeng...@apache.org>; >> *发送时间:* 2017年11月17日(星期五) 下午2:02 >> *收件人:* "user"<user@kylin.apache.org>; >> *主题:* Re: Can hierarchyDims contain jointDims >> >> 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 <43535...@qq.com>: >> >>> 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 史少锋 >> >> >
?????? Can hierarchyDims contain jointDims
So this issues is work in progress, and result in the two piece contradict code. thank you for make me clear. -- -- ??: "Alberto Ram??n"<a.ramonporto...@gmail.com>; : 2017??11??18??(??) 5:59 ??: "user"<user@kylin.apache.org>; ????: Re: Can hierarchyDims contain jointDims https://issues.apache.org/jira/browse/KYLIN-2149 Check this link, you need choose between use one or other Some times would be great use both together On 17 November 2017 at 06:43, doom <43535...@qq.com> wrote: So what's the second code segment mean in AggregationGroup build step??0?2 is it means replace the hierarchy dim with the joint dims witch contain it? --?0?2?0?2-- ??:?0?2"ShaoFeng Shi";<shaofeng...@apache.org>; :?0?22017??11??17??(??) 2:02 ??????:?0?2"user"<user@kylin.apache.org>; :?0?2Re: Can hierarchyDims contain jointDims 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 <43535...@qq.com>: 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() { ?0?2 ?0?2 ... ?0?2 ?0?2 if (CollectionUtils.containsAny(hierarchyDims, jointDims)) { ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 logger.error("Aggregation group " + index + " hierarchy dimensions overlap with joint dimensions"); ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 throw new IllegalStateException( ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 "Aggregation group " + index + " hierarchy dimensions overlap with joint dimensions: " ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 + 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) { ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 . ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 for (int i = 0; i < hierarchy_dims.length; i++) { ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 TblColRef hColumn = cubeDesc.getModel().findColumn(hierarchy_dims[i]); ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 Integer index = rowKeyDesc.getColumnBitIndex(hColumn); ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 long bit = 1L << index; ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 // combine joint as logic dim ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 if (dim2JointMap.get(bit) != null) {?0?2?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 bit = dim2JointMap.get(bit); ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 } ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 mask.fullMask |= bit; ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 allMaskList.add(mask.fullMask); ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 dimList.add(bit); ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 ?0?2 } } do i understand in a wrong way? -- Best regards, Shaofeng Shi ??
Re: Can hierarchyDims contain jointDims
https://issues.apache.org/jira/browse/KYLIN-2149 Check this link, you need choose between use one or other Some times would be great use both together On 17 November 2017 at 06:43, doom <43535...@qq.com> wrote: > So what's the second code segment mean in AggregationGroup build step? > is it means replace the hierarchy dim with the joint dims witch contain it? > > > -- 原始邮件 -- > *发件人:* "ShaoFeng Shi";<shaofeng...@apache.org>; > *发送时间:* 2017年11月17日(星期五) 下午2:02 > *收件人:* "user"<user@kylin.apache.org>; > *主题:* Re: Can hierarchyDims contain jointDims > > 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 <43535...@qq.com>: > >> 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 史少锋 > >
?????? Can hierarchyDims contain jointDims
So what's the second code segment mean in AggregationGroup build step? is it means replace the hierarchy dim with the joint dims witch contain it? -- -- ??: "ShaoFeng Shi";<shaofeng...@apache.org>; : 2017??11??17??(??) 2:02 ??: "user"<user@kylin.apache.org>; ????: Re: Can hierarchyDims contain jointDims 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 <43535...@qq.com>: 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 ??
Re: Can hierarchyDims contain jointDims
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 <43535...@qq.com>: > 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 史少锋
Can hierarchyDims contain jointDims
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?