KYLIN-608 bug fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/a864ba2d Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/a864ba2d Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/a864ba2d Branch: refs/heads/inverted-index Commit: a864ba2d2c3e7354dac0f66e7c315563a0e71b88 Parents: ecfc3cc Author: honma <ho...@ebay.com> Authored: Thu Feb 12 13:02:57 2015 +0800 Committer: honma <ho...@ebay.com> Committed: Thu Feb 12 13:02:57 2015 +0800 ---------------------------------------------------------------------- .../coprocessor/endpoint/EndpointAggregators.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a864ba2d/storage/src/main/java/org/apache/kylin/storage/hbase/coprocessor/endpoint/EndpointAggregators.java ---------------------------------------------------------------------- diff --git a/storage/src/main/java/org/apache/kylin/storage/hbase/coprocessor/endpoint/EndpointAggregators.java b/storage/src/main/java/org/apache/kylin/storage/hbase/coprocessor/endpoint/EndpointAggregators.java index c6d8c49..516c160 100644 --- a/storage/src/main/java/org/apache/kylin/storage/hbase/coprocessor/endpoint/EndpointAggregators.java +++ b/storage/src/main/java/org/apache/kylin/storage/hbase/coprocessor/endpoint/EndpointAggregators.java @@ -157,6 +157,14 @@ public class EndpointAggregators { rawTableRecord.setBytes(row, 0, row.length); for (int metricIndex = 0; metricIndex < metricInfos.length; ++metricIndex) { + if (metricInfos[metricIndex].type == MetricType.Count) { + measureAggrs[metricIndex].aggregate(ONE); + continue; + } + + if (metricInfos[metricIndex].type == MetricType.DimensionAsMetric) { + continue; + } MetricInfo metricInfo = metricInfos[metricIndex]; MeasureAggregator aggregator = measureAggrs[metricIndex]; @@ -178,13 +186,6 @@ public class EndpointAggregators { aggregator.aggregate(hllc); } } - - //aggregate for "count" - for (int i = 0; i < metricInfos.length; ++i) { - if (metricInfos[i].type == MetricType.Count) { - measureAggrs[i].aggregate(ONE); - } - } } /**