carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang...@apache.org
Subject [09/50] [abbrv] incubator-carbondata git commit: fix for count on column group (#815)
Date Wed, 20 Jul 2016 10:13:37 GMT
fix for count on column group (#815)



Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/f3589b4e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/f3589b4e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/f3589b4e

Branch: refs/heads/master
Commit: f3589b4ed2d469dca8dcd3213c4f63def784c6a0
Parents: e18c305
Author: ashokblend <ashok.blend@gmail.com>
Authored: Fri Jul 15 14:46:15 2016 +0530
Committer: Vimal-Das <vimaldas.kammath@gmail.com>
Committed: Fri Jul 15 14:46:15 2016 +0530

----------------------------------------------------------------------
 .../org/carbondata/query/carbon/executor/util/QueryUtil.java    | 2 +-
 .../testsuite/detailquery/ColumnGroupDataTypesTestCase.scala    | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/f3589b4e/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java b/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
index aedfe53..9de0ca1 100644
--- a/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
+++ b/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
@@ -770,7 +770,7 @@ public class QueryUtil {
       // be done
       // only once
       CarbonDimension dim = entry.getValue().get(0).getDim();
-      if (entry.getValue().size() > 1) {
+      if (entry.getValue().size() > 1 || !dim.isColumnar()) {
         // how many aggregator will be used for column group
         int numberOfAggregatorForColumnGroup = 0;
         List<Dictionary> dictionaryList = new ArrayList<Dictionary>();

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/f3589b4e/integration/spark/src/test/scala/org/carbondata/spark/testsuite/detailquery/ColumnGroupDataTypesTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/carbondata/spark/testsuite/detailquery/ColumnGroupDataTypesTestCase.scala
b/integration/spark/src/test/scala/org/carbondata/spark/testsuite/detailquery/ColumnGroupDataTypesTestCase.scala
index 8098308..122e0f1 100644
--- a/integration/spark/src/test/scala/org/carbondata/spark/testsuite/detailquery/ColumnGroupDataTypesTestCase.scala
+++ b/integration/spark/src/test/scala/org/carbondata/spark/testsuite/detailquery/ColumnGroupDataTypesTestCase.scala
@@ -84,6 +84,11 @@ class ColumnGroupDataTypesTestCase extends QueryTest with BeforeAndAfterAll
{
       sql("select column1,column3,column4,column5,column6,column9,column10 from normal"))
   }
 
+  test("select count on column group") {
+    checkAnswer(
+      sql("select count(column2) from colgrp"),
+      sql("select count(column2) from normal"))
+  }
    test("##ColumnGroup_DictionaryExcludeBefore select all dimension on column group and dictionary
exclude table") {
     checkAnswer(
       sql("select * from colgrp_dictexclude_before"),


Mime
View raw message