dethrive commented on code in PR #2089:
URL: https://github.com/apache/kylin/pull/2089#discussion_r1107395563
##########
src/core-metadata/src/main/java/org/apache/kylin/metadata/cube/model/RuleBasedIndex.java:
##########
@@ -348,6 +391,18 @@ Set<LayoutEntity> genCuboidLayouts(Set<LayoutEntity>
previousLayouts, Set<Layout
if (excludeDel) {
genLayouts.removeIf(layout ->
layoutBlackList.contains(layout.getId()));
}
+
+ // If contains the `layout_cost_based_pruned_list`, will use layouts
in the cost based planner list
+ if (useCostBasedList && layoutsOfCostBasedList != null) {
+ // use the recommend white list id
+ Set<LayoutEntity> result = Sets.newHashSet();
+ genLayouts.stream().forEach(layout -> {
Review Comment:
为啥 layoutsOfCostBasedList 这个属性不直接初始化了?
##########
src/core-metadata/src/main/java/org/apache/kylin/metadata/cube/model/RuleBasedIndex.java:
##########
@@ -348,6 +391,18 @@ Set<LayoutEntity> genCuboidLayouts(Set<LayoutEntity>
previousLayouts, Set<Layout
if (excludeDel) {
Review Comment:
这上面生成 layouts 的逻辑需要抽取出来,否则加入了新的逻辑,这边代码复杂度超过了 20
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]