This is an automated email from the ASF dual-hosted git repository.

nju_yaho pushed a commit to tag ebay-3.1.0-release-20200701
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit c0e4cbbf318b18021065d37805ed1519d3d50e50
Author: Zhong, Yanghong <nju_y...@apache.org>
AuthorDate: Wed May 27 16:30:21 2020 +0800

    KYLIN-4536 Lower the bar to trigger cube planner phase one
---
 .../org/apache/kylin/cube/cuboid/algorithm/CuboidRecommender.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/algorithm/CuboidRecommender.java
 
b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/algorithm/CuboidRecommender.java
index 1f3eaaf..dfea903 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/algorithm/CuboidRecommender.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/algorithm/CuboidRecommender.java
@@ -118,8 +118,8 @@ public class CuboidRecommender {
      */
     public Map<Long, Long> getRecommendCuboidList(CuboidStats cuboidStats, 
KylinConfig kylinConf,
             boolean ifForceRecommend) {
-        long threshold1 = 1L << 
kylinConf.getCubePlannerAgreedyAlgorithmAutoThreshold();
-        long threshold2 = 1L << 
kylinConf.getCubePlannerGeneticAlgorithmAutoThreshold();
+        long threshold1 = 1L << 
kylinConf.getCubePlannerAgreedyAlgorithmAutoThreshold() - 1;
+        long threshold2 = 1L << 
kylinConf.getCubePlannerGeneticAlgorithmAutoThreshold() - 1;
         if (threshold1 >= threshold2) {
             logger.error("Invalid Cube Planner Algorithm configuration");
             return null;
@@ -128,7 +128,7 @@ public class CuboidRecommender {
         int allCuboidCount = cuboidStats.getAllCuboidsForMandatory().size()
                 + cuboidStats.getAllCuboidsForSelection().size();
 
-        if (!ifForceRecommend && allCuboidCount <= threshold1) {
+        if (!ifForceRecommend && allCuboidCount < threshold1) {
             return null;
         }
 

Reply via email to