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

nju_yaho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/master by this push:
     new 565a442  KYLIN-3320 fix CubeStatsReader cannot print stats properly 
for some cube
565a442 is described below

commit 565a442dc388b67578b5099810de0b5925867d60
Author: Ma Gang <mg4w...@163.com>
AuthorDate: Tue Mar 27 17:10:22 2018 +0800

    KYLIN-3320 fix CubeStatsReader cannot print stats properly for some cube
---
 .../org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java 
b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java
index 45b741e..3808e59 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java
@@ -27,8 +27,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.annotation.Nullable;
-
 import org.apache.kylin.cube.CubeInstance;
 import org.apache.kylin.cube.model.AggregationGroup;
 import org.apache.kylin.cube.model.CubeDesc;
@@ -36,7 +34,6 @@ import org.apache.kylin.cube.model.CubeDesc;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
 
@@ -122,13 +119,11 @@ public class TreeCuboidScheduler extends CuboidScheduler {
                 throw new IllegalArgumentException("the cuboid:" + cuboidId + 
" is not exist in the tree");
             }
 
-            return Lists.transform(node.children, new Function<TreeNode, 
Long>() {
-                @Nullable
-                @Override
-                public Long apply(@Nullable TreeNode input) {
-                    return input.cuboidId;
-                }
-            });
+            List<Long> result = Lists.newArrayList();
+            for (TreeNode child : node.children) {
+                result.add(child.cuboidId);
+            }
+            return result;
         }
 
         public long findBestMatchCuboid(long cuboidId) {

-- 
To stop receiving notification emails like this one, please contact
nju_y...@apache.org.

Reply via email to