carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject carbondata git commit: [CARBONDATA-1776] Fix some possible test errors that are related to compaction
Date Mon, 20 Nov 2017 10:50:10 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master 82277ddfb -> 400395a8d


[CARBONDATA-1776] Fix some possible test errors that are related to compaction

Fix some possible test errors that are related to compaction
This PR only changed test class

This closes #1536


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

Branch: refs/heads/master
Commit: 400395a8d288fb03ce3ca8c5726f8b095a48c5c0
Parents: 82277dd
Author: xubo245 <601450868@qq.com>
Authored: Mon Nov 20 15:19:27 2017 +0800
Committer: Jacky Li <jacky.likun@qq.com>
Committed: Mon Nov 20 18:49:46 2017 +0800

----------------------------------------------------------------------
 .../CompactionSupportGlobalSortFunctionTest.scala |  8 ++++----
 .../dataload/TestGlobalSortDataLoad.scala         | 18 ++++++++----------
 2 files changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/400395a8/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSupportGlobalSortFunctionTest.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSupportGlobalSortFunctionTest.scala
b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSupportGlobalSortFunctionTest.scala
index 3873b0d..65a50fe 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSupportGlobalSortFunctionTest.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/CompactionSupportGlobalSortFunctionTest.scala
@@ -440,8 +440,8 @@ class CompactionSupportGlobalSortFunctionTest extends QueryTest with BeforeAndAf
 
     assert(getIndexFileCount("compaction_globalsort", "0.1") === 3)
     checkAnswer(sql("SELECT COUNT(*) FROM compaction_globalsort"), Seq(Row(72)))
-    checkAnswer(sql("SELECT * FROM compaction_globalsort"),
-      sql("SELECT * FROM carbon_localsort"))
+    checkAnswer(sql("SELECT * FROM compaction_globalsort order by name, id"),
+      sql("SELECT * FROM carbon_localsort order by name, id"))
     checkExistence(sql("SHOW SEGMENTS FOR TABLE compaction_globalsort"), true, "Success")
     checkExistence(sql("SHOW SEGMENTS FOR TABLE compaction_globalsort"), true, "Compacted")
   }
@@ -455,8 +455,8 @@ class CompactionSupportGlobalSortFunctionTest extends QueryTest with BeforeAndAf
 
     assert(getIndexFileCount("compaction_globalsort", "0.1") === 3)
     checkAnswer(sql("SELECT COUNT(*) FROM compaction_globalsort"), Seq(Row(72)))
-    checkAnswer(sql("SELECT * FROM compaction_globalsort"),
-      sql("SELECT * FROM carbon_localsort"))
+    checkAnswer(sql("SELECT * FROM compaction_globalsort order by name, id"),
+      sql("SELECT * FROM carbon_localsort order by name, id"))
     checkExistence(sql("SHOW SEGMENTS FOR TABLE compaction_globalsort"), true, "Success")
     checkExistence(sql("SHOW SEGMENTS FOR TABLE compaction_globalsort"), true, "Compacted")
   }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/400395a8/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestGlobalSortDataLoad.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestGlobalSortDataLoad.scala
b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestGlobalSortDataLoad.scala
index 9f941f0..2031592 100644
--- a/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestGlobalSortDataLoad.scala
+++ b/integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestGlobalSortDataLoad.scala
@@ -17,8 +17,6 @@
 
 package org.apache.carbondata.spark.testsuite.dataload
 
-import java.io.{File, FilenameFilter}
-
 import org.apache.carbondata.core.constants.CarbonCommonConstants
 import org.apache.carbondata.core.util.CarbonProperties
 import org.apache.carbondata.spark.exception.MalformedCarbonCommandException
@@ -168,8 +166,8 @@ class TestGlobalSortDataLoad extends QueryTest with BeforeAndAfterEach
with Befo
 
     assert(getIndexFileCount("carbon_globalsort") === 3)
     checkAnswer(sql("SELECT COUNT(*) FROM carbon_globalsort"), Seq(Row(24)))
-    checkAnswer(sql("SELECT * FROM carbon_globalsort ORDER BY name"),
-      sql("SELECT * FROM carbon_localsort_twice ORDER BY name"))
+    checkAnswer(sql("SELECT * FROM carbon_globalsort ORDER BY name, id"),
+      sql("SELECT * FROM carbon_localsort_twice ORDER BY name, id"))
   }
 
   // ----------------------------------- Check Configurations -----------------------------------
@@ -227,8 +225,8 @@ class TestGlobalSortDataLoad extends QueryTest with BeforeAndAfterEach
with Befo
 
     assert(getIndexFileCount("carbon_globalsort") === 3)
     checkAnswer(sql("SELECT COUNT(*) FROM carbon_globalsort"), Seq(Row(11)))
-    checkAnswer(sql("SELECT * FROM carbon_globalsort ORDER BY name"),
-      sql("SELECT * FROM carbon_localsort_delete ORDER BY name"))
+    checkAnswer(sql("SELECT * FROM carbon_globalsort ORDER BY name, id"),
+      sql("SELECT * FROM carbon_localsort_delete ORDER BY name, id"))
   }
 
   test("LOAD with UPDATE") {
@@ -248,8 +246,8 @@ class TestGlobalSortDataLoad extends QueryTest with BeforeAndAfterEach
with Befo
     sql("select * from carbon_globalsort").show()
     checkAnswer(sql("SELECT COUNT(*) FROM carbon_globalsort"), Seq(Row(12)))
     checkAnswer(sql("SELECT name FROM carbon_globalsort WHERE id = 2"), Seq(Row("bb")))
-    checkAnswer(sql("SELECT * FROM carbon_globalsort ORDER BY name"),
-      sql("SELECT * FROM carbon_localsort_update ORDER BY name"))
+    checkAnswer(sql("SELECT * FROM carbon_globalsort ORDER BY name, id"),
+      sql("SELECT * FROM carbon_localsort_update ORDER BY name, id"))
   }
 
   // ----------------------------------- INSERT INTO -----------------------------------
@@ -260,8 +258,8 @@ class TestGlobalSortDataLoad extends QueryTest with BeforeAndAfterEach
with Befo
 
     assert(getIndexFileCount("carbon_globalsort") === 2)
     checkAnswer(sql("SELECT COUNT(*) FROM carbon_globalsort"), Seq(Row(12)))
-    checkAnswer(sql("SELECT * FROM carbon_globalsort ORDER BY name"),
-      sql("SELECT * FROM carbon_localsort_once ORDER BY name"))
+    checkAnswer(sql("SELECT * FROM carbon_globalsort ORDER BY name, id"),
+      sql("SELECT * FROM carbon_localsort_once ORDER BY name, id"))
   }
 
   test("Test with different date types") {


Mime
View raw message