You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2016/09/14 08:50:18 UTC
[31/50] [abbrv] kylin git commit: KYLIN-1922 fix CI, again
KYLIN-1922 fix CI, again
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/0362c2bb
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/0362c2bb
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/0362c2bb
Branch: refs/heads/KYLIN-1726
Commit: 0362c2bb8ea8c9f0178fbe4eb08113eaf94cd01b
Parents: 3c4537d
Author: Hongbin Ma <ma...@apache.org>
Authored: Tue Sep 13 11:58:41 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Tue Sep 13 14:10:30 2016 +0800
----------------------------------------------------------------------
.../kylin/cube/CubeCapabilityChecker.java | 9 +++++++-
.../kylin/measure/topn/TopNMeasureType.java | 3 +--
.../src/test/resources/query/sql/query45.sql | 23 --------------------
.../resources/query/sql_tableau/query16.sql | 1 +
4 files changed, 10 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/0362c2bb/core-cube/src/main/java/org/apache/kylin/cube/CubeCapabilityChecker.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeCapabilityChecker.java b/core-cube/src/main/java/org/apache/kylin/cube/CubeCapabilityChecker.java
index e8c96b4..caef529 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeCapabilityChecker.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeCapabilityChecker.java
@@ -24,6 +24,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import org.apache.commons.lang.StringUtils;
import org.apache.kylin.cube.model.CubeDesc;
import org.apache.kylin.measure.MeasureType;
import org.apache.kylin.measure.basic.BasicMeasureType;
@@ -39,6 +40,7 @@ import org.apache.kylin.metadata.realization.CapabilityResult.CapabilityInfluenc
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
/**
@@ -163,6 +165,7 @@ public class CubeCapabilityChecker {
// custom measure types can cover unmatched dimensions or measures
private static void tryCustomMeasureTypes(Collection<TblColRef> unmatchedDimensions, Collection<FunctionDesc> unmatchedAggregations, SQLDigest digest, CubeInstance cube, CapabilityResult result) {
CubeDesc cubeDesc = cube.getDescriptor();
+ List<String> influencingMeasures = Lists.newArrayList();
for (MeasureDesc measure : cubeDesc.getMeasures()) {
// if (unmatchedDimensions.isEmpty() && unmatchedAggregations.isEmpty())
// break;
@@ -172,9 +175,13 @@ public class CubeCapabilityChecker {
continue;
CapabilityInfluence inf = measureType.influenceCapabilityCheck(unmatchedDimensions, unmatchedAggregations, digest, measure);
- if (inf != null)
+ if (inf != null) {
result.influences.add(inf);
+ influencingMeasures.add(measure.getName() + "@" + measureType.getClass());
+ }
}
+ if (influencingMeasures.size() != 0)
+ logger.info("Cube {} CapabilityInfluences: {}", cube.getCanonicalName(), StringUtils.join(influencingMeasures, ","));
}
}
http://git-wip-us.apache.org/repos/asf/kylin/blob/0362c2bb/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
index 01eb90c..800ca88 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
@@ -274,11 +274,10 @@ public class TopNMeasureType extends MeasureType<TopNCounter<ByteArray>> {
if (sum.isSum() == false)
return false;
-
+
if (sum.getParameter() == null || sum.getParameter().getColRefs() == null || sum.getParameter().getColRefs().size() == 0)
return false;
-
TblColRef sumCol = sum.getParameter().getColRefs().get(0);
return sumCol.equals(topnNumCol);
}
http://git-wip-us.apache.org/repos/asf/kylin/blob/0362c2bb/kylin-it/src/test/resources/query/sql/query45.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql/query45.sql b/kylin-it/src/test/resources/query/sql/query45.sql
deleted file mode 100644
index d3cfb06..0000000
--- a/kylin-it/src/test/resources/query/sql/query45.sql
+++ /dev/null
@@ -1,23 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership. The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-
-
-select seller_id,lstg_format_name, sum(price) as s from test_kylin_fact
- where lstg_format_name='FP-GTC'
- group by seller_id,lstg_format_name
http://git-wip-us.apache.org/repos/asf/kylin/blob/0362c2bb/kylin-it/src/test/resources/query/sql_tableau/query16.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_tableau/query16.sql b/kylin-it/src/test/resources/query/sql_tableau/query16.sql
index aaa4ab2..ad82c09 100644
--- a/kylin-it/src/test/resources/query/sql_tableau/query16.sql
+++ b/kylin-it/src/test/resources/query/sql_tableau/query16.sql
@@ -20,3 +20,4 @@ SELECT EXTRACT(YEAR FROM TEST_CAL_DT.WEEK_BEG_DT) AS yr_WEEK_BEG_DT_ok, QUARTER(
FROM TEST_KYLIN_FACT
inner JOIN EDW.TEST_CAL_DT AS TEST_CAL_DT ON (TEST_KYLIN_FACT.CAL_DT = TEST_CAL_DT.CAL_DT)
GROUP BY EXTRACT(YEAR FROM TEST_CAL_DT.WEEK_BEG_DT), QUARTER(TEST_CAL_DT.WEEK_BEG_DT)
+