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

ASF GitHub Bot commented on KYLIN-5387:
---------------------------------------

liukun4515 commented on code in PR #2089:
URL: https://github.com/apache/kylin/pull/2089#discussion_r1107961735


##########
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属性初始化为null,表示model的rule base index没有被planner算法剪枝过。
   如果model的rule base index被planner算法剪枝过,`layoutsOfCostBasedList`的值就不是null了。rule 
base index只能 产生 `layoutsOfCostBasedList` 包含的ID的layout。





> Migrate cube planner phase 1 to kylin5
> --------------------------------------
>
>                 Key: KYLIN-5387
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5387
>             Project: Kylin
>          Issue Type: Improvement
>          Components: Job Engine
>    Affects Versions: 5.0-alpha
>            Reporter: Kun Liu
>            Assignee: Kun Liu
>            Priority: Major
>
> kylin3.1 support the cube planner to recommend cuboid when building the first 
> segment.
>  
> We need to migrate the cost based algorithm to the kylin5, and leverage the 
> cube planner algorithm with the index in kylin5
>  
> designe doc:
> https://docs.google.com/document/d/1wUNd8U1u-w8T-qQUReplPhDFkETj3AtFr_Shex501ls/edit?usp=sharing



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to