You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ch...@apache.org on 2017/03/19 02:07:11 UTC
[1/2] incubator-carbondata git commit: Fixed count with null values
giving wrong values
Repository: incubator-carbondata
Updated Branches:
refs/heads/master 6c17fad71 -> 0b44d0e3a
Fixed count with null values giving wrong values
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/38345ec2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/38345ec2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/38345ec2
Branch: refs/heads/master
Commit: 38345ec2c62ac3deeb60784cdc4d6baae6568c1b
Parents: 6c17fad
Author: ravipesala <ra...@gmail.com>
Authored: Sat Mar 18 21:43:43 2017 +0530
Committer: ravipesala <ra...@gmail.com>
Committed: Sat Mar 18 21:43:43 2017 +0530
----------------------------------------------------------------------
.../spark/testsuite/emptyrow/TestEmptyRows.scala | 14 ++++++++++++++
.../spark/sql/optimizer/CarbonLateDecodeRule.scala | 1 -
2 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/38345ec2/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/emptyrow/TestEmptyRows.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/emptyrow/TestEmptyRows.scala b/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/emptyrow/TestEmptyRows.scala
index e7beff2..f31d434 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/emptyrow/TestEmptyRows.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/emptyrow/TestEmptyRows.scala
@@ -67,6 +67,20 @@ class TestEmptyRows extends QueryTest with BeforeAndAfterAll {
)
}
+ test("select count(Desc) from emptyRowTable") {
+ checkAnswer(
+ sql("select count(Desc) from emptyRowCarbonTable"),
+ sql("select count(Desc) from emptyRowHiveTable")
+ )
+ }
+
+ test("select count(distinct Desc) from emptyRowTable") {
+ checkAnswer(
+ sql("select count(distinct Desc) from emptyRowCarbonTable"),
+ sql("select count(distinct Desc) from emptyRowHiveTable")
+ )
+ }
+
override def afterAll {
sql("drop table emptyRowCarbonTable")
sql("drop table emptyRowHiveTable")
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/38345ec2/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonLateDecodeRule.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonLateDecodeRule.scala b/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonLateDecodeRule.scala
index 502b96a..6555e9b 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonLateDecodeRule.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/optimizer/CarbonLateDecodeRule.scala
@@ -211,7 +211,6 @@ class CarbonLateDecodeRule extends Rule[LogicalPlan] with PredicateHelper {
agg.aggregateExpressions.map {
case attr: AttributeReference =>
case a@Alias(attr: AttributeReference, name) =>
- case Alias(AggregateExpression(Count(Seq(attr: AttributeReference)), _, _, _), _) =>
case aggExp: AggregateExpression =>
aggExp.transform {
case aggExp: AggregateExpression =>
[2/2] incubator-carbondata git commit: [CARBONDATA-793] Fixed count
with null values giving wrong values This closes #671
Posted by ch...@apache.org.
[CARBONDATA-793] Fixed count with null values giving wrong values This closes #671
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/0b44d0e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/0b44d0e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/0b44d0e3
Branch: refs/heads/master
Commit: 0b44d0e3aeba4bdfc4a193549785b9171476ed81
Parents: 6c17fad 38345ec
Author: chenliang613 <ch...@huawei.com>
Authored: Sun Mar 19 10:06:51 2017 +0800
Committer: chenliang613 <ch...@huawei.com>
Committed: Sun Mar 19 10:06:51 2017 +0800
----------------------------------------------------------------------
.../spark/testsuite/emptyrow/TestEmptyRows.scala | 14 ++++++++++++++
.../spark/sql/optimizer/CarbonLateDecodeRule.scala | 1 -
2 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------