carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang...@apache.org
Subject [1/2] incubator-carbondata git commit: modify testcase
Date Mon, 05 Sep 2016 09:07:05 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 9c2d70339 -> 713d2c110


modify testcase


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

Branch: refs/heads/master
Commit: 5d18e97d9813367efca92fcbee3384f956aba15a
Parents: 9c2d703
Author: jackylk <jacky.likun@huawei.com>
Authored: Mon Sep 5 13:23:06 2016 +0800
Committer: jackylk <jacky.likun@huawei.com>
Committed: Mon Sep 5 13:23:06 2016 +0800

----------------------------------------------------------------------
 .../AllDataTypesTestCaseAggregate.scala         |  6 +-
 .../filterexpr/FilterProcessorTestCase.scala    | 60 +++++++++-----------
 2 files changed, 30 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5d18e97d/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/aggquery/AllDataTypesTestCaseAggregate.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/aggquery/AllDataTypesTestCaseAggregate.scala
b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/aggquery/AllDataTypesTestCaseAggregate.scala
index 1d82d88..51ba86c 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/aggquery/AllDataTypesTestCaseAggregate.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/aggquery/AllDataTypesTestCaseAggregate.scala
@@ -36,6 +36,7 @@ class AllDataTypesTestCaseAggregate extends QueryTest with BeforeAndAfterAll
{
   override def beforeAll {
     CarbonProperties.getInstance()
       .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "dd-MM-yyyy")
+    sql("DROP TABLE IF EXISTS alldatatypescubeAGG")
     sql(
       "CREATE TABLE alldatatypestableAGG (empno int, empname String, designation String,
doj " +
       "Timestamp, workgroupcategory int, workgroupcategoryname String, deptno int, deptname
" +
@@ -44,7 +45,7 @@ class AllDataTypesTestCaseAggregate extends QueryTest with BeforeAndAfterAll
{
     sql(
       "LOAD DATA LOCAL INPATH './src/test/resources/data.csv' INTO TABLE alldatatypestableAGG
" +
       "OPTIONS('DELIMITER'= ',', 'QUOTECHAR'= '\"')")
-      
+    sql("DROP TABLE IF EXISTS alldatatypescubeAGG_hive")
     sql(
       "CREATE TABLE alldatatypescubeAGG_hive (empno int, empname String, designation String,
doj " +
       "Timestamp, workgroupcategory int, workgroupcategoryname String, deptno int, deptname
" +
@@ -106,6 +107,7 @@ class AllDataTypesTestCaseAggregate extends QueryTest with BeforeAndAfterAll
{
   }
 
   override def afterAll {
-    sql("drop table alldatatypestableAGG")
+    sql("DROP TABLE IF EXISTS alldatatypescubeAGG")
+    sql("DROP TABLE IF EXISTS alldatatypescubeAGG_hive")
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5d18e97d/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/filterexpr/FilterProcessorTestCase.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/filterexpr/FilterProcessorTestCase.scala
b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/filterexpr/FilterProcessorTestCase.scala
index d4f2a65..7e29cd1 100644
--- a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/filterexpr/FilterProcessorTestCase.scala
+++ b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/filterexpr/FilterProcessorTestCase.scala
@@ -31,8 +31,6 @@ import org.scalatest.BeforeAndAfterAll
 /**
   * Test Class for filter expression query on String datatypes
   *
-  * @author N00902756
-  *
   */
 class FilterProcessorTestCase extends QueryTest with BeforeAndAfterAll {
 
@@ -85,14 +83,15 @@ class FilterProcessorTestCase extends QueryTest with BeforeAndAfterAll
{
         s"OPTIONS('DELIMITER'= ',', " +
         s"'FILEHEADER'= '')"
     )
+    sql("DROP TABLE IF EXISTS filtertestTablesWithNull")
     sql(
       "CREATE TABLE filtertestTablesWithNull (ID int, date Timestamp, country " +
         "String, " +
         "name String, phonetype String, serialname String,salary int) " +
       "STORED BY 'org.apache.carbondata.format'"
     )
-    
-        sql(
+    sql("DROP TABLE IF EXISTS filtertestTablesWithNullJoin")
+    sql(
       "CREATE TABLE filtertestTablesWithNullJoin (ID int, date Timestamp, country " +
         "String, " +
         "name String, phonetype String, serialname String,salary int) " +
@@ -112,38 +111,25 @@ class FilterProcessorTestCase extends QueryTest with BeforeAndAfterAll
{
         s"OPTIONS('DELIMITER'= ',', " +
         s"'FILEHEADER'= '')"
     )
+
+    sql("DROP TABLE IF EXISTS big_int_basicc")
+    sql("DROP TABLE IF EXISTS big_int_basicc_1")
+    sql("DROP TABLE IF EXISTS big_int_basicc_Hive")
+    sql("DROP TABLE IF EXISTS big_int_basicc_Hive_1")
+    sql("CREATE TABLE big_int_basicc (imei string,age int,task bigint,name string,country
string,city string,sale int,num double,level decimal(10,3),quest bigint,productdate timestamp,enddate
timestamp,PointId double,score decimal(10,3))STORED BY 'org.apache.carbondata.format'")
+    sql("CREATE TABLE big_int_basicc_1 (imei string,age int,task bigint,name string,country
string,city string,sale int,num double,level decimal(10,3),quest bigint,productdate timestamp,enddate
timestamp,PointId double,score decimal(10,3))STORED BY 'org.apache.carbondata.format'")
+    sql("CREATE TABLE big_int_basicc_Hive (imei string,age int,task bigint,name string,country
string,city string,sale int,num double,level decimal(10,3),quest bigint,productdate date,enddate
date,PointId double,score decimal(10,3))row format delimited fields terminated by ',' " +
+        "tblproperties(\"skip.header.line.count\"=\"1\") ")
+    sql("CREATE TABLE big_int_basicc_Hive_1 (imei string,age int,task bigint,name string,country
string,city string,sale int,num double,level decimal(10,3),quest bigint,productdate date,enddate
date,PointId double,score decimal(10,3))row format delimited fields terminated by ',' " +
+        "tblproperties(\"skip.header.line.count\"=\"1\") ")
+    CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT,
"yyyy-MM-dd HH:mm:ss")
+    sql("LOAD DATA INPATH './src/test/resources/big_int_Decimal.csv'  INTO TABLE big_int_basicc
options ('DELIMITER'=',', 'QUOTECHAR'='\"', 'COMPLEX_DELIMITER_LEVEL_1'='$','COMPLEX_DELIMITER_LEVEL_2'=':',
'FILEHEADER'= '')")
+    sql("LOAD DATA INPATH './src/test/resources/big_int_Decimal.csv'  INTO TABLE big_int_basicc_1
options ('DELIMITER'=',', 'QUOTECHAR'='\"', 'COMPLEX_DELIMITER_LEVEL_1'='$','COMPLEX_DELIMITER_LEVEL_2'=':',
'FILEHEADER'= '')")
+    sql("load data local inpath './src/test/resources/big_int_Decimal.csv' into table big_int_basicc_Hive")
+    sql("load data local inpath './src/test/resources/big_int_Decimal.csv' into table big_int_basicc_Hive_1")
   }
 
-         sql("CREATE TABLE big_int_basicc (imei string,age int,task bigint,name string,country
string,city string,sale int,num double,level decimal(10,3),quest bigint,productdate timestamp,enddate
timestamp,PointId double,score decimal(10,3))STORED BY 'org.apache.carbondata.format'")
-        sql("CREATE TABLE big_int_basicc_1 (imei string,age int,task bigint,name string,country
string,city string,sale int,num double,level decimal(10,3),quest bigint,productdate timestamp,enddate
timestamp,PointId double,score decimal(10,3))STORED BY 'org.apache.carbondata.format'")
-        
-        sql("CREATE TABLE big_int_basicc_Hive (imei string,age int,task bigint,name string,country
string,city string,sale int,num double,level decimal(10,3),quest bigint,productdate date,enddate
date,PointId double,score decimal(10,3))row format delimited fields terminated by ',' " +
-        "tblproperties(\"skip.header.line.count\"=\"1\") " +
-        ""
-    )
-        sql("CREATE TABLE big_int_basicc_Hive_1 (imei string,age int,task bigint,name string,country
string,city string,sale int,num double,level decimal(10,3),quest bigint,productdate date,enddate
date,PointId double,score decimal(10,3))row format delimited fields terminated by ',' " +
-        "tblproperties(\"skip.header.line.count\"=\"1\") " +
-        ""
-    )
-        CarbonProperties.getInstance()
-      .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "yyyy-MM-dd HH:mm:ss")
-  sql(
-        "LOAD DATA INPATH './src/test/resources/big_int_Decimal.csv'  INTO TABLE big_int_basicc
options ('DELIMITER'=',', 'QUOTECHAR'='\"', 'COMPLEX_DELIMITER_LEVEL_1'='$','COMPLEX_DELIMITER_LEVEL_2'=':',
'FILEHEADER'= '')"
-    );
-        
-    sql(
-        "LOAD DATA INPATH './src/test/resources/big_int_Decimal.csv'  INTO TABLE big_int_basicc_1
options ('DELIMITER'=',', 'QUOTECHAR'='\"', 'COMPLEX_DELIMITER_LEVEL_1'='$','COMPLEX_DELIMITER_LEVEL_2'=':',
'FILEHEADER'= '')"
-    );
-    
-        sql(
-      "load data local inpath './src/test/resources/big_int_Decimal.csv' into table " +
-        "big_int_basicc_Hive"
-    );
-      sql(
-      "load data local inpath './src/test/resources/big_int_Decimal.csv' into table " +
-        "big_int_basicc_Hive_1"
-    );
-    
+
   test("Is not null filter") {
     checkAnswer(
       sql("select id from filtertestTablesWithNull " + "where id is not null"),
@@ -292,6 +278,12 @@ class FilterProcessorTestCase extends QueryTest with BeforeAndAfterAll
{
     sql("drop table if exists filtertestTablesWithNull")
     sql("drop table if exists filterTimestampDataType")
     sql("drop table if exists noloadtable")
+    sql("DROP TABLE IF EXISTS big_int_basicc")
+    sql("DROP TABLE IF EXISTS big_int_basicc_1")
+    sql("DROP TABLE IF EXISTS big_int_basicc_Hive")
+    sql("DROP TABLE IF EXISTS big_int_basicc_Hive_1")
+    sql("DROP TABLE IF EXISTS filtertestTablesWithNull")
+    sql("DROP TABLE IF EXISTS filtertestTablesWithNullJoin")
     CarbonProperties.getInstance()
       .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "dd-MM-yyyy")
   }


Mime
View raw message