You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ra...@apache.org on 2016/12/05 13:13:04 UTC

[1/3] incubator-carbondata git commit: improved integration test cases for alldatatypecheckcase2

Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 1d8ad7dfa -> 87f745c60


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/92f7637c/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase2.scala
----------------------------------------------------------------------
diff --git a/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase2.scala b/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase2.scala
index 86b88a7..6011647 100644
--- a/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase2.scala
+++ b/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase2.scala
@@ -21,15 +21,12 @@ package org.apache.carbondata.spark.testsuite.allqueries
 
 import java.io.File
 
-import org.apache.spark.sql.Row
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.util.CarbonProperties
 import org.apache.spark.sql.common.util.CarbonHiveContext._
 import org.apache.spark.sql.common.util.QueryTest
-
-import org.apache.carbondata.core.util.CarbonProperties
 import org.scalatest.BeforeAndAfterAll
 
-import org.apache.carbondata.core.constants.CarbonCommonConstants
-
 /**
   * Test Class for all queries on multiple datatypes
   * Manohar
@@ -40,110 +37,113 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
 
     val currentDirectory = new File(this.getClass.getResource("/").getPath + "/../../")
       .getCanonicalPath
+
     try {
       sql(
         "create table Carbon_automation_test2 (imei string,deviceInformationId int,MAC string," +
-        "deviceColor string,device_backColor string,modelId string,marketName string,AMSize " +
-        "string,ROMSize string,CUPAudit string,CPIClocked string,series string,productionDate " +
-        "string,bomCode string,internalModels string, deliveryTime string, channelsId string, " +
-        "channelsName string , deliveryAreaId string, deliveryCountry string, deliveryProvince " +
-        "string, deliveryCity string,deliveryDistrict string, deliveryStreet string, " +
-        "oxSingleNumber string, ActiveCheckTime string, ActiveAreaId string, ActiveCountry " +
-        "string, ActiveProvince string, Activecity string, ActiveDistrict string, ActiveStreet " +
-        "string, ActiveOperatorId string, Active_releaseId string, Active_EMUIVersion string, " +
-        "Active_operaSysVersion string, Active_BacVerNumber string, Active_BacFlashVer string, " +
-        "Active_webUIVersion string, Active_webUITypeCarrVer string,Active_webTypeDataVerNumber " +
-        "string, Active_operatorsVersion string, Active_phonePADPartitionedVersions string, " +
-        "Latest_YEAR int, Latest_MONTH int, Latest_DAY int, Latest_HOUR string, Latest_areaId " +
-        "string, Latest_country string, Latest_province string, Latest_city string, " +
-        "Latest_district string, Latest_street string, Latest_releaseId string, " +
-        "Latest_EMUIVersion string, Latest_operaSysVersion string, Latest_BacVerNumber string, " +
-        "Latest_BacFlashVer string, Latest_webUIVersion string, Latest_webUITypeCarrVer string, " +
-        "Latest_webTypeDataVerNumber string, Latest_operatorsVersion string, " +
-        "Latest_phonePADPartitionedVersions string, Latest_operatorId string, " +
-        "gamePointDescription string, gamePointId int,contractNumber int) stored by 'org.apache" +
-        ".carbondata.format' TBLPROPERTIES('DICTIONARY_INCLUDE'='Latest_DAY,deviceInformationId')")
+          "deviceColor string,device_backColor string,modelId string,marketName string,AMSize " +
+          "string,ROMSize string,CUPAudit string,CPIClocked string,series string,productionDate " +
+          "string,bomCode string,internalModels string, deliveryTime string, channelsId string, " +
+          "channelsName string , deliveryAreaId string, deliveryCountry string, deliveryProvince " +
+          "string, deliveryCity string,deliveryDistrict string, deliveryStreet string, " +
+          "oxSingleNumber string, ActiveCheckTime string, ActiveAreaId string, ActiveCountry " +
+          "string, ActiveProvince string, Activecity string, ActiveDistrict string, ActiveStreet " +
+          "string, ActiveOperatorId string, Active_releaseId string, Active_EMUIVersion string, " +
+          "Active_operaSysVersion string, Active_BacVerNumber string, Active_BacFlashVer string, " +
+          "Active_webUIVersion string, Active_webUITypeCarrVer string,Active_webTypeDataVerNumber " +
+          "string, Active_operatorsVersion string, Active_phonePADPartitionedVersions string, " +
+          "Latest_YEAR int, Latest_MONTH int, Latest_DAY int, Latest_HOUR string, Latest_areaId " +
+          "string, Latest_country string, Latest_province string, Latest_city string, " +
+          "Latest_district string, Latest_street string, Latest_releaseId string, " +
+          "Latest_EMUIVersion string, Latest_operaSysVersion string, Latest_BacVerNumber string, " +
+          "Latest_BacFlashVer string, Latest_webUIVersion string, Latest_webUITypeCarrVer string, " +
+          "Latest_webTypeDataVerNumber string, Latest_operatorsVersion string, " +
+          "Latest_phonePADPartitionedVersions string, Latest_operatorId string, " +
+          "gamePointDescription string, gamePointId int,contractNumber int) stored by 'org.apache" +
+          ".carbondata.format' TBLPROPERTIES('DICTIONARY_INCLUDE'='Latest_webTypeDataVerNumber')")
+
       CarbonProperties.getInstance()
         .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT,
           CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT
         )
+
       sql("LOAD DATA LOCAL INPATH '" + currentDirectory +
-          "/src/test/resources/100_olap.csv' INTO table Carbon_automation_test2 OPTIONS" +
-          "('DELIMITER'= ',' ,'QUOTECHAR'= '\"', 'FILEHEADER'= 'imei,deviceInformationId,MAC," +
-          "deviceColor,device_backColor,modelId,marketName,AMSize,ROMSize,CUPAudit,CPIClocked," +
-          "series,productionDate,bomCode,internalModels,deliveryTime,channelsId,channelsName," +
-          "deliveryAreaId,deliveryCountry,deliveryProvince,deliveryCity,deliveryDistrict," +
-          "deliveryStreet,oxSingleNumber,contractNumber,ActiveCheckTime,ActiveAreaId," +
-          "ActiveCountry,ActiveProvince,Activecity,ActiveDistrict,ActiveStreet,ActiveOperatorId," +
-          "Active_releaseId,Active_EMUIVersion,Active_operaSysVersion,Active_BacVerNumber," +
-          "Active_BacFlashVer,Active_webUIVersion,Active_webUITypeCarrVer," +
-          "Active_webTypeDataVerNumber,Active_operatorsVersion," +
-          "Active_phonePADPartitionedVersions,Latest_YEAR,Latest_MONTH,Latest_DAY,Latest_HOUR," +
-          "Latest_areaId,Latest_country,Latest_province,Latest_city,Latest_district," +
-          "Latest_street,Latest_releaseId,Latest_EMUIVersion,Latest_operaSysVersion," +
-          "Latest_BacVerNumber,Latest_BacFlashVer,Latest_webUIVersion,Latest_webUITypeCarrVer," +
-          "Latest_webTypeDataVerNumber,Latest_operatorsVersion," +
-          "Latest_phonePADPartitionedVersions,Latest_operatorId,gamePointId,gamePointDescription')")
+        "/src/test/resources/100_olap.csv' INTO table Carbon_automation_test2 OPTIONS" +
+        "('DELIMITER'= ',' ,'QUOTECHAR'= '\"', 'FILEHEADER'= 'imei,deviceInformationId,MAC," +
+        "deviceColor,device_backColor,modelId,marketName,AMSize,ROMSize,CUPAudit,CPIClocked," +
+        "series,productionDate,bomCode,internalModels,deliveryTime,channelsId,channelsName," +
+        "deliveryAreaId,deliveryCountry,deliveryProvince,deliveryCity,deliveryDistrict," +
+        "deliveryStreet,oxSingleNumber,contractNumber,ActiveCheckTime,ActiveAreaId," +
+        "ActiveCountry,ActiveProvince,Activecity,ActiveDistrict,ActiveStreet,ActiveOperatorId," +
+        "Active_releaseId,Active_EMUIVersion,Active_operaSysVersion,Active_BacVerNumber," +
+        "Active_BacFlashVer,Active_webUIVersion,Active_webUITypeCarrVer," +
+        "Active_webTypeDataVerNumber,Active_operatorsVersion," +
+        "Active_phonePADPartitionedVersions,Latest_YEAR,Latest_MONTH,Latest_DAY,Latest_HOUR," +
+        "Latest_areaId,Latest_country,Latest_province,Latest_city,Latest_district," +
+        "Latest_street,Latest_releaseId,Latest_EMUIVersion,Latest_operaSysVersion," +
+        "Latest_BacVerNumber,Latest_BacFlashVer,Latest_webUIVersion,Latest_webUITypeCarrVer," +
+        "Latest_webTypeDataVerNumber,Latest_operatorsVersion," +
+        "Latest_phonePADPartitionedVersions,Latest_operatorId,gamePointId,gamePointDescription')")
 
       sql(
         "create table Carbon_automation_hive (imei string,deviceInformationId int,MAC string," +
-        "deviceColor string,device_backColor string,modelId string,marketName string,AMSize " +
-        "string,ROMSize string,CUPAudit string,CPIClocked string,series string,productionDate " +
-        "string,bomCode string,internalModels string, deliveryTime string, channelsId string, " +
-        "channelsName string , deliveryAreaId string, deliveryCountry string, deliveryProvince " +
-        "string, deliveryCity string,deliveryDistrict string, deliveryStreet string, " +
-        "oxSingleNumber string, ActiveCheckTime string, ActiveAreaId string, ActiveCountry " +
-        "string, ActiveProvince string, Activecity string, ActiveDistrict string, ActiveStreet " +
-        "string, ActiveOperatorId string, Active_releaseId string, Active_EMUIVersion string, " +
-        "Active_operaSysVersion string, Active_BacVerNumber string, Active_BacFlashVer string, " +
-        "Active_webUIVersion string, Active_webUITypeCarrVer string,Active_webTypeDataVerNumber " +
-        "string, Active_operatorsVersion string, Active_phonePADPartitionedVersions string, " +
-        "Latest_YEAR int, Latest_MONTH int, Latest_DAY int, Latest_HOUR string, Latest_areaId " +
-        "string, Latest_country string, Latest_province string, Latest_city string, " +
-        "Latest_district string, Latest_street string, Latest_releaseId string, " +
-        "Latest_EMUIVersion string, Latest_operaSysVersion string, Latest_BacVerNumber string, " +
-        "Latest_BacFlashVer string, Latest_webUIVersion string, Latest_webUITypeCarrVer string, " +
-        "Latest_webTypeDataVerNumber string, Latest_operatorsVersion string, " +
-        "Latest_phonePADPartitionedVersions string, Latest_operatorId string, " +
-        "gamePointDescription string, gamePointId int,contractNumber int)" +
-        " row format delimited fields terminated by ','"
+          "deviceColor string,device_backColor string,modelId string,marketName string,AMSize " +
+          "string,ROMSize string,CUPAudit string,CPIClocked string,series string,productionDate " +
+          "string,bomCode string,internalModels string, deliveryTime string, channelsId string, " +
+          "channelsName string , deliveryAreaId string, deliveryCountry string, deliveryProvince " +
+          "string, deliveryCity string,deliveryDistrict string, deliveryStreet string, " +
+          "oxSingleNumber string, ActiveCheckTime string, ActiveAreaId string, ActiveCountry " +
+          "string, ActiveProvince string, Activecity string, ActiveDistrict string, ActiveStreet " +
+          "string, ActiveOperatorId string, Active_releaseId string, Active_EMUIVersion string, " +
+          "Active_operaSysVersion string, Active_BacVerNumber string, Active_BacFlashVer string, " +
+          "Active_webUIVersion string, Active_webUITypeCarrVer string,Active_webTypeDataVerNumber " +
+          "string, Active_operatorsVersion string, Active_phonePADPartitionedVersions string, " +
+          "Latest_YEAR int, Latest_MONTH int, Latest_DAY int, Latest_HOUR string, Latest_areaId " +
+          "string, Latest_country string, Latest_province string, Latest_city string, " +
+          "Latest_district string, Latest_street string, Latest_releaseId string, " +
+          "Latest_EMUIVersion string, Latest_operaSysVersion string, Latest_BacVerNumber string, " +
+          "Latest_BacFlashVer string, Latest_webUIVersion string, Latest_webUITypeCarrVer string, " +
+          "Latest_webTypeDataVerNumber string, Latest_operatorsVersion string, " +
+          "Latest_phonePADPartitionedVersions string, Latest_operatorId string, " +
+          "gamePointDescription string, gamePointId int,contractNumber int)" +
+          " row format delimited fields terminated by ','"
       )
 
       sql("LOAD DATA LOCAL INPATH '" + currentDirectory + "/src/test/resources/100_olap.csv' INTO " +
-          "table Carbon_automation_hive ")
+        "table Carbon_automation_hive ")
 
       sql(
         "create table if not exists Carbon_automation_hive2(imei string,deviceInformationId int," +
-        "MAC string,deviceColor string,device_backColor string,modelId string,marketName " +
-        "string,AMSize string,ROMSize string,CUPAudit string,CPIClocked string,series string," +
-        "productionDate timestamp,bomCode string,internalModels string, deliveryTime string, " +
-        "channelsId string, channelsName string , deliveryAreaId string, deliveryCountry " +
-        "string, deliveryProvince string, deliveryCity string,deliveryDistrict string, " +
-        "deliveryStreet string, oxSingleNumber string,contractNumber int, ActiveCheckTime string, ActiveAreaId " +
-        "string, ActiveCountry string, ActiveProvince string, Activecity string, ActiveDistrict" +
-        " string, ActiveStreet string, ActiveOperatorId string, Active_releaseId string, " +
-        "Active_EMUIVersion string, Active_operaSysVersion string, Active_BacVerNumber string, " +
-        "Active_BacFlashVer string, Active_webUIVersion string, Active_webUITypeCarrVer string," +
-        "Active_webTypeDataVerNumber string, Active_operatorsVersion string, " +
-        "Active_phonePADPartitionedVersions string, Latest_YEAR int, Latest_MONTH int, " +
-        "Latest_DAY int, Latest_HOUR string, Latest_areaId string, Latest_country string, " +
-        "Latest_province string, Latest_city string, Latest_district string, Latest_street " +
-        "string, Latest_releaseId string, Latest_EMUIVersion string, Latest_operaSysVersion " +
-        "string, Latest_BacVerNumber string, Latest_BacFlashVer string, Latest_webUIVersion " +
-        "string, Latest_webUITypeCarrVer string, Latest_webTypeDataVerNumber string, " +
-        "Latest_operatorsVersion string, Latest_phonePADPartitionedVersions string, " +
-        "Latest_operatorId string, gamePointId int,gamePointDescription string" +
-        ") row format delimited fields terminated by ','"
+          "MAC string,deviceColor string,device_backColor string,modelId string,marketName " +
+          "string,AMSize string,ROMSize string,CUPAudit string,CPIClocked string,series string," +
+          "productionDate timestamp,bomCode string,internalModels string, deliveryTime string, " +
+          "channelsId string, channelsName string , deliveryAreaId string, deliveryCountry " +
+          "string, deliveryProvince string, deliveryCity string,deliveryDistrict string, " +
+          "deliveryStreet string, oxSingleNumber string,contractNumber int, ActiveCheckTime string, ActiveAreaId " +
+          "string, ActiveCountry string, ActiveProvince string, Activecity string, ActiveDistrict" +
+          " string, ActiveStreet string, ActiveOperatorId string, Active_releaseId string, " +
+          "Active_EMUIVersion string, Active_operaSysVersion string, Active_BacVerNumber string, " +
+          "Active_BacFlashVer string, Active_webUIVersion string, Active_webUITypeCarrVer string," +
+          "Active_webTypeDataVerNumber string, Active_operatorsVersion string, " +
+          "Active_phonePADPartitionedVersions string, Latest_YEAR int, Latest_MONTH int, " +
+          "Latest_DAY int, Latest_HOUR string, Latest_areaId string, Latest_country string, " +
+          "Latest_province string, Latest_city string, Latest_district string, Latest_street " +
+          "string, Latest_releaseId string, Latest_EMUIVersion string, Latest_operaSysVersion " +
+          "string, Latest_BacVerNumber string, Latest_BacFlashVer string, Latest_webUIVersion " +
+          "string, Latest_webUITypeCarrVer string, Latest_webTypeDataVerNumber string, " +
+          "Latest_operatorsVersion string, Latest_phonePADPartitionedVersions string, " +
+          "Latest_operatorId string, gamePointId int,gamePointDescription string" +
+          ") row format delimited fields terminated by ','"
       )
       sql("LOAD DATA LOCAL INPATH '" + currentDirectory + "/src/test/resources/100_olap.csv' INTO " +
-          "table Carbon_automation_hive2 ")
+        "table Carbon_automation_hive2 ")
     } catch {
       case e: Exception => print("ERROR : " + e.getMessage)
     }
   }
 
   override def afterAll {
-    //CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "dd-MM-yyyy")
+    CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "dd-MM-yyyy")
     try {
       sql("drop table Carbon_automation_test2")
       sql("drop table Carbon_automation_hive")
@@ -153,33 +153,24 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
     }
   }
 
+
   //Test-23
   test(
     "select channelsId, sum(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
       "channelsId order by Total"
   ) {
+
     checkAnswer(
       sql(
         "select channelsId, sum(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
           "channelsId order by Total"
       ),
-      Seq(Row("2", 18659),
-        Row("7", 20484),
-        Row("1", 20934),
-        Row("4", 20991.197),
-        Row("5", 23024),
-        Row("3", 25241),
-        Row("6", 28542)
-      )
+      sql("select channelsId, sum(gamePointId+ 10) Total from Carbon_automation_hive2 group by  " +
+        "channelsId order by Total")
     )
 
   }
 
-
-
-
-
-
   //Test-28
   test(
     "select channelsId, avg(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
@@ -189,20 +180,14 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
       sql(
         "select channelsId, avg(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
           "channelsId order by Total"
-      ),
-      Seq(Row("7", 1138),
-        Row("6", 1502.2105263157894),
-        Row("3", 1577.5625),
-        Row("1", 1744.5),
-        Row("4", 1749.2664166666666),
-        Row("2", 1865.9),
-        Row("5", 1918.66666666666667)
-      )
+      ), sql(
+        "select channelsId, avg(gamePointId+ 10) Total from Carbon_automation_hive2 group by  " +
+          "channelsId order by Total")
+
     )
 
   }
 
-
   //Test-32
   test(
     "select channelsId, count(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
@@ -212,15 +197,11 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
       sql(
         "select channelsId, count(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
           "channelsId order by Total"
-      ),
-      Seq(Row("2", 10),
-        Row("1", 12),
-        Row("4", 12),
-        Row("5", 12),
-        Row("3", 16),
-        Row("7", 18),
-        Row("6", 19)
+      ), sql(
+        "select channelsId, count(gamePointId+ 10) Total from Carbon_automation_hive2 group by  " +
+          "channelsId order by Total"
       )
+
     )
 
   }
@@ -235,21 +216,15 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
       sql(
         "select channelsId, min(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
           "channelsId order by Total"
-      ),
-      Seq(Row("1", 39),
-        Row("6", 89),
-        Row("3", 161),
-        Row("7", 266),
-        Row("5", 308),
-        Row("4", 451),
-        Row("2", 578)
+      ), sql(
+        "select channelsId, min(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
+          "channelsId order by Total"
       )
+
     )
 
   }
 
-
-
   //Test-40
   test(
     "select channelsId, max(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
@@ -259,15 +234,11 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
       sql(
         "select channelsId, max(gamePointId+ 10) Total from Carbon_automation_test2 group by  " +
           "channelsId order by Total"
-      ),
-      Seq(Row("3", 2249),
-        Row("7", 2358),
-        Row("4", 2836),
-        Row("1", 2873),
-        Row("6", 2962),
-        Row("2", 2980),
-        Row("5", 2982)
+      ), sql(
+        "select channelsId, max(gamePointId+ 10) Total from Carbon_automation_hive2 group by  " +
+          "channelsId order by Total"
       )
+
     )
 
   }
@@ -282,49 +253,9 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
       sql(
         "select Latest_YEAR ,count(distinct Latest_YEAR) from Carbon_automation_test2 group by " +
           "Latest_YEAR"
-      ),
-      Seq(Row(2015, 1))
-    )
-  }
-  )
-  //TC_053
-  test("select avg(gamepointid) +10 as a ,series  from Carbon_automation_test2 group by series")({
-    checkAnswer(
-      sql("select avg(gamepointid) +10 as a ,series  from Carbon_automation_test2 group by series"),
-      Seq(Row(1445.7777777777778, "6Series"),
-        Row(1735.3333333333333, "0Series"),
-        Row(1553.0, "4Series"),
-        Row(1243.3636363636363, "8Series"),
-        Row(1700.1088181818182, "7Series"),
-        Row(1343.6666666666667, "1Series"),
-        Row(1720.0588235294117, "5Series"),
-        Row(1625.0, "9Series"),
-        Row(1914.375, "3Series"),
-        Row(1382.6666666666667, "2Series")
-      )
-    )
-  }
-  )
-
-  //TC_059
-  test(
-    "select count(distinct gamepointid)+10 as a,series from Carbon_automation_test2 group by series"
-  )({
-    checkAnswer(
-      sql(
-        "select count(distinct gamepointid)+10 as a,series from Carbon_automation_test2 group by " +
-          "series"
-      ),
-      Seq(Row(19, "6Series"),
-        Row(25, "0Series"),
-        Row(18, "4Series"),
-        Row(21, "8Series"),
-        Row(21, "7Series"),
-        Row(13, "1Series"),
-        Row(26, "5Series"),
-        Row(18, "9Series"),
-        Row(18, "3Series"),
-        Row(19, "2Series")
+      ), sql(
+        "select Latest_YEAR ,count(distinct Latest_YEAR) from Carbon_automation_hive2 group by " +
+          "Latest_YEAR"
       )
     )
   }
@@ -333,8 +264,9 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   //TC_068
   test("select count (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2")({
     checkAnswer(
-      sql("select count (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2"),
-      Seq(Row(2))
+      sql("select count (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_hive2"),
+      sql("select count (if(gamePointId>100,NULL,gamePointId))  a from " +
+        "Carbon_automation_test2")
     )
   }
   )
@@ -343,7 +275,8 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select count(DISTINCT gamePointId) as a from Carbon_automation_test2")({
     checkAnswer(
       sql("select count(DISTINCT gamePointId) as a from Carbon_automation_test2"),
-      Seq(Row(97))
+      sql("select count(DISTINCT gamePointId) as a from Carbon_automation_hive2")
+
     )
   }
   )
@@ -352,7 +285,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select sum( DISTINCT gamePointId) a  from Carbon_automation_test2")({
     checkAnswer(
       sql("select sum( DISTINCT gamePointId) a  from Carbon_automation_test2"),
-      Seq(Row(153284.19700000001))
+      sql("select sum( DISTINCT gamePointId) a  from Carbon_automation_hive2")
     )
   }
   )
@@ -360,8 +293,8 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   //TC_079
   test("select sum (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2")({
     checkAnswer(
-      sql("select sum (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2"),
-      Seq(Row(108.0))
+      sql("select sum (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_hive2"),
+      sql("select sum (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2")
     )
   }
   )
@@ -370,7 +303,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select avg(gamePointId) a  from Carbon_automation_test2")({
     checkAnswer(
       sql("select avg(gamePointId) a  from Carbon_automation_test2"),
-      Seq(Row(1584.6989595959594))
+      sql("select avg(gamePointId) a  from Carbon_automation_hive2")
     )
   }
   )
@@ -379,7 +312,8 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select avg (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2")({
     checkAnswer(
       sql("select avg (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2"),
-      Seq(Row(54.0))
+      sql("select avg (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_hive2")
+
     )
   }
   )
@@ -389,7 +323,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select min(gamePointId) a  from Carbon_automation_test2")({
     checkAnswer(
       sql("select min(gamePointId) a  from Carbon_automation_test2"),
-      Seq(Row(29.0))
+      sql("select min(gamePointId) a  from Carbon_automation_hive2")
     )
   }
   )
@@ -399,7 +333,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select min (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2")({
     checkAnswer(
       sql("select min (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2"),
-      Seq(Row(29.0))
+      sql("select min (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_hive2")
     )
   }
   )
@@ -408,7 +342,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select max(gamePointId) a  from Carbon_automation_test2")({
     checkAnswer(
       sql("select max(gamePointId) a  from Carbon_automation_test2"),
-      Seq(Row(2972.0))
+      sql("select max(gamePointId) a  from Carbon_automation_hive2")
     )
   }
   )
@@ -417,7 +351,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select max (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2")({
     checkAnswer(
       sql("select max (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_test2"),
-      Seq(Row(79.0))
+      sql("select max (if(gamePointId>100,NULL,gamePointId))  a from Carbon_automation_hive2")
     )
   }
   )
@@ -426,7 +360,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select stddev_pop(gamePointId) as a  from Carbon_automation_test2")({
     checkAnswer(
       sql("select stddev_pop(gamePointId) as a  from Carbon_automation_test2"),
-      Seq(Row(809.1896217395077))
+      sql("select stddev_pop(gamePointId) as a  from Carbon_automation_hive2")
     )
   }
   )
@@ -435,7 +369,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select covar_pop(gamePointId,gamePointId) as a  from Carbon_automation_test2")({
     checkAnswer(
       sql("select covar_pop(gamePointId,gamePointId) as a  from Carbon_automation_test2"),
-      Seq(Row(654787.8439309277))
+      sql("select covar_pop(gamePointId,gamePointId) as a  from Carbon_automation_hive2")
     )
   }
   )
@@ -444,7 +378,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select covar_samp(gamePointId,gamePointId) as a  from Carbon_automation_test2")({
     checkAnswer(
       sql("select covar_samp(gamePointId,gamePointId) as a  from Carbon_automation_test2"),
-      Seq(Row(661469.3525424678))
+      sql("select covar_samp(gamePointId,gamePointId) as a  from Carbon_automation_hive2")
     )
   }
   )
@@ -453,53 +387,7 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
   test("select percentile_approx(gamePointId,0.2) as a  from Carbon_automation_test2")({
     checkAnswer(
       sql("select percentile_approx(gamePointId,0.2) as a  from Carbon_automation_test2"),
-      Seq(Row(746.4))
-    )
-  }
-  )
-
-  //TC_140
-  test(
-    "select count(distinct deviceColor) a,deliveryProvince,series from Carbon_automation_test2 " +
-      "group by deliveryProvince,series order by deliveryProvince,series"
-  )({
-    checkAnswer(
-      sql(
-        "select count(distinct deviceColor) a,deliveryProvince,series from " +
-          "Carbon_automation_test2 group by deliveryProvince,series order by deliveryProvince," +
-          "series"
-      ),
-      Seq(Row(5, "Guangdong Province", "0Series"),
-        Row(1, "Guangdong Province", "1Series"),
-        Row(2, "Guangdong Province", "2Series"),
-        Row(3, "Guangdong Province", "3Series"),
-        Row(1, "Guangdong Province", "4Series"),
-        Row(6, "Guangdong Province", "5Series"),
-        Row(1, "Guangdong Province", "6Series"),
-        Row(1, "Guangdong Province", "7Series"),
-        Row(3, "Guangdong Province", "8Series"),
-        Row(2, "Guangdong Province", "9Series"),
-        Row(3, "Hubei Province", "0Series"),
-        Row(1, "Hubei Province", "1Series"),
-        Row(4, "Hubei Province", "2Series"),
-        Row(1, "Hubei Province", "3Series"),
-        Row(2, "Hubei Province", "4Series"),
-        Row(1, "Hubei Province", "5Series"),
-        Row(2, "Hubei Province", "6Series"),
-        Row(6, "Hubei Province", "7Series"),
-        Row(3, "Hubei Province", "8Series"),
-        Row(2, "Hubei Province", "9Series"),
-        Row(6, "Hunan Province", "0Series"),
-        Row(1, "Hunan Province", "1Series"),
-        Row(3, "Hunan Province", "2Series"),
-        Row(1, "Hunan Province", "3Series"),
-        Row(4, "Hunan Province", "4Series"),
-        Row(7, "Hunan Province", "5Series"),
-        Row(6, "Hunan Province", "6Series"),
-        Row(3, "Hunan Province", "7Series"),
-        Row(5, "Hunan Province", "8Series"),
-        Row(3, "Hunan Province", "9Series")
-      )
+      sql("select percentile_approx(gamePointId,0.2) as a  from Carbon_automation_hive2")
     )
   }
   )
@@ -515,38 +403,12 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
         "select deliveryCountry,deliveryProvince,series,sum(gamePointId) a from " +
           "Carbon_automation_test2 group by deliveryCountry,deliveryProvince,series order by " +
           "deliveryCountry,deliveryProvince,series"
-      ),
-      Seq(Row("Chinese", "Guangdong Province", "0Series", 11182.0),
-        Row("Chinese", "Guangdong Province", "1Series", 1053.0),
-        Row("Chinese", "Guangdong Province", "2Series", 3468.0),
-        Row("Chinese", "Guangdong Province", "3Series", 11206.0),
-        Row("Chinese", "Guangdong Province", "4Series", 1337.0),
-        Row("Chinese", "Guangdong Province", "5Series", 10962.0),
-        Row("Chinese", "Guangdong Province", "6Series", 1229.0),
-        Row("Chinese", "Guangdong Province", "7Series", 3543.0),
-        Row("Chinese", "Guangdong Province", "8Series", 3859.0),
-        Row("Chinese", "Guangdong Province", "9Series", 1525.0),
-        Row("Chinese", "Hubei Province", "0Series", 5545.0),
-        Row("Chinese", "Hubei Province", "1Series", 2593.0),
-        Row("Chinese", "Hubei Province", "2Series", 4344.0),
-        Row("Chinese", "Hubei Province", "3Series", 2077.0),
-        Row("Chinese", "Hubei Province", "4Series", 3542.0),
-        Row("Chinese", "Hubei Province", "5Series", 692.0),
-        Row("Chinese", "Hubei Province", "6Series", 1657.0),
-        Row("Chinese", "Hubei Province", "7Series", 10629.197),
-        Row("Chinese", "Hubei Province", "8Series", 3279.0),
-        Row("Chinese", "Hubei Province", "9Series", 3088.0),
-        Row("Chinese", "Hunan Province", "0Series", 9153.0),
-        Row("Chinese", "Hunan Province", "1Series", 355.0),
-        Row("Chinese", "Hunan Province", "2Series", 4542.0),
-        Row("Chinese", "Hunan Province", "3Series", 1952.0),
-        Row("Chinese", "Hunan Province", "4Series", 7465.0),
-        Row("Chinese", "Hunan Province", "5Series", 17417.0),
-        Row("Chinese", "Hunan Province", "6Series", 10036.0),
-        Row("Chinese", "Hunan Province", "7Series", 4419.0),
-        Row("Chinese", "Hunan Province", "8Series", 6429.0),
-        Row("Chinese", "Hunan Province", "9Series", 8307.0)
+      ), sql(
+        "select deliveryCountry,deliveryProvince,series,sum(gamePointId) a from " +
+          "Carbon_automation_hive2 group by deliveryCountry,deliveryProvince,series order by " +
+          "deliveryCountry,deliveryProvince,series"
       )
+
     )
   }
   )
@@ -559,18 +421,11 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
       sql(
         "select series,avg(gamePointId) a from Carbon_automation_test2 group by series order by " +
           "series"
-      ),
-      Seq(Row("0Series", 1725.3333333333333),
-        Row("1Series", 1333.6666666666667),
-        Row("2Series", 1372.6666666666667),
-        Row("3Series", 1904.375),
-        Row("4Series", 1543.0),
-        Row("5Series", 1710.0588235294117),
-        Row("6Series", 1435.7777777777778),
-        Row("7Series", 1690.1088181818182),
-        Row("8Series", 1233.3636363636363),
-        Row("9Series", 1615.0)
+      ), sql(
+        "select series,avg(gamePointId) a from Carbon_automation_hive2 group by series order by " +
+          "series"
       )
+
     )
   }
   )
@@ -586,38 +441,12 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
         "select deliveryCountry,deliveryProvince,series,avg(gamePointId) a from " +
           "Carbon_automation_test2 group by deliveryCountry,deliveryProvince,series order by " +
           "deliveryCountry,deliveryProvince,series"
-      ),
-      Seq(Row("Chinese", "Guangdong Province", "0Series", 1863.6666666666667),
-        Row("Chinese", "Guangdong Province", "1Series", 1053.0),
-        Row("Chinese", "Guangdong Province", "2Series", 1734.0),
-        Row("Chinese", "Guangdong Province", "3Series", 2241.2),
-        Row("Chinese", "Guangdong Province", "4Series", 1337.0),
-        Row("Chinese", "Guangdong Province", "5Series", 1566.0),
-        Row("Chinese", "Guangdong Province", "6Series", 1229.0),
-        Row("Chinese", "Guangdong Province", "7Series", 1771.5),
-        Row("Chinese", "Guangdong Province", "8Series", 1286.3333333333333),
-        Row("Chinese", "Guangdong Province", "9Series", 762.5),
-        Row("Chinese", "Hubei Province", "0Series", 1848.3333333333333),
-        Row("Chinese", "Hubei Province", "1Series", 2593.0),
-        Row("Chinese", "Hubei Province", "2Series", 1086.0),
-        Row("Chinese", "Hubei Province", "3Series", 2077.0),
-        Row("Chinese", "Hubei Province", "4Series", 1771.0),
-        Row("Chinese", "Hubei Province", "5Series", 692.0),
-        Row("Chinese", "Hubei Province", "6Series", 828.5),
-        Row("Chinese", "Hubei Province", "7Series", 1771.5328333333334),
-        Row("Chinese", "Hubei Province", "8Series", 1093.0),
-        Row("Chinese", "Hubei Province", "9Series", 1544.0),
-        Row("Chinese", "Hunan Province", "0Series", 1525.5),
-        Row("Chinese", "Hunan Province", "1Series", 355.0),
-        Row("Chinese", "Hunan Province", "2Series", 1514.0),
-        Row("Chinese", "Hunan Province", "3Series", 976.0),
-        Row("Chinese", "Hunan Province", "4Series", 1493.0),
-        Row("Chinese", "Hunan Province", "5Series", 1935.2222222222222),
-        Row("Chinese", "Hunan Province", "6Series", 1672.6666666666667),
-        Row("Chinese", "Hunan Province", "7Series", 1473.0),
-        Row("Chinese", "Hunan Province", "8Series", 1285.8),
-        Row("Chinese", "Hunan Province", "9Series", 2076.75)
+      ), sql(
+        "select deliveryCountry,deliveryProvince,series,avg(gamePointId) a from " +
+          "Carbon_automation_hive2 group by deliveryCountry,deliveryProvince,series order by " +
+          "deliveryCountry,deliveryProvince,series"
       )
+
     )
   }
   )
@@ -630,4132 +459,675 @@ class AllDataTypesTestCase2 extends QueryTest with BeforeAndAfterAll {
       sql(
         "select series,min(gamePointId) a from Carbon_automation_test2 group by series order by " +
           "series"
-      ),
-      Seq(Row("0Series", 202.0),
-        Row("1Series", 355.0),
-        Row("2Series", 29.0),
-        Row("3Series", 79.0),
-        Row("4Series", 448.0),
-        Row("5Series", 151.0),
-        Row("6Series", 750.0),
-        Row("7Series", 1015.0),
-        Row("8Series", 412.0),
-        Row("9Series", 136.0)
+      ), sql(
+        "select series,min(gamePointId) a from Carbon_automation_hive2 group by series order by " +
+          "series"
       )
+
     )
   }
   )
 
-  //TC_152
+
+
+  //TC_156
   test(
-    "select deliveryCountry,deliveryProvince,series,min(gamePointId) a from " +
-      "Carbon_automation_test2 group by deliveryCountry,deliveryProvince,series order by " +
-      "deliveryCountry,deliveryProvince,series"
+    "select series,max(gamePointId) a from Carbon_automation_test2 group by series order by series"
   )({
     checkAnswer(
       sql(
-        "select deliveryCountry,deliveryProvince,series,min(gamePointId) a from " +
-          "Carbon_automation_test2 group by deliveryCountry,deliveryProvince,series order by " +
-          "deliveryCountry,deliveryProvince,series"
-      ),
-      Seq(Row("Chinese", "Guangdong Province", "0Series", 202.0),
-        Row("Chinese", "Guangdong Province", "1Series", 1053.0),
-        Row("Chinese", "Guangdong Province", "2Series", 1407.0),
-        Row("Chinese", "Guangdong Province", "3Series", 1077.0),
-        Row("Chinese", "Guangdong Province", "4Series", 1337.0),
-        Row("Chinese", "Guangdong Province", "5Series", 256.0),
-        Row("Chinese", "Guangdong Province", "6Series", 1229.0),
-        Row("Chinese", "Guangdong Province", "7Series", 1368.0),
-        Row("Chinese", "Guangdong Province", "8Series", 412.0),
-        Row("Chinese", "Guangdong Province", "9Series", 571.0),
-        Row("Chinese", "Hubei Province", "0Series", 732.0),
-        Row("Chinese", "Hubei Province", "1Series", 2593.0),
-        Row("Chinese", "Hubei Province", "2Series", 29.0),
-        Row("Chinese", "Hubei Province", "3Series", 2077.0),
-        Row("Chinese", "Hubei Province", "4Series", 572.0),
-        Row("Chinese", "Hubei Province", "5Series", 692.0),
-        Row("Chinese", "Hubei Province", "6Series", 750.0),
-        Row("Chinese", "Hubei Province", "7Series", 1080.0),
-        Row("Chinese", "Hubei Province", "8Series", 441.0),
-        Row("Chinese", "Hubei Province", "9Series", 136.0),
-        Row("Chinese", "Hunan Province", "0Series", 505.0),
-        Row("Chinese", "Hunan Province", "1Series", 355.0),
-        Row("Chinese", "Hunan Province", "2Series", 298.0),
-        Row("Chinese", "Hunan Province", "3Series", 79.0),
-        Row("Chinese", "Hunan Province", "4Series", 448.0),
-        Row("Chinese", "Hunan Province", "5Series", 151.0),
-        Row("Chinese", "Hunan Province", "6Series", 845.0),
-        Row("Chinese", "Hunan Province", "7Series", 1015.0),
-        Row("Chinese", "Hunan Province", "8Series", 538.0),
-        Row("Chinese", "Hunan Province", "9Series", 1823.0)
+        "select series,max(gamePointId) a from Carbon_automation_test2 group by series order by " +
+          "series"
+      ), sql(
+        "select series,max(gamePointId) a from Carbon_automation_hive2 group by series order by " +
+          "series"
       )
+
     )
   }
   )
 
-  //TC_153
-  test(
-    "select deliveryProvince,series,min(deviceInformationId) a from Carbon_automation_test2 group" +
-      " by deliveryProvince,series order by deliveryProvince,series"
-  )({
+  //TC_169
+  test("select imei,series,gamePointId from Carbon_automation_test2 limit 10")({
     checkAnswer(
-      sql(
-        "select deliveryProvince,series,min(deviceInformationId) a from Carbon_automation_test2 " +
-          "group by deliveryProvince,series order by deliveryProvince,series"
-      ),
-      Seq(Row("Guangdong Province", "0Series", 100011),
-        Row("Guangdong Province", "1Series", 100032),
-        Row("Guangdong Province", "2Series", 100034),
-        Row("Guangdong Province", "3Series", 10006),
-        Row("Guangdong Province", "4Series", 100059),
-        Row("Guangdong Province", "5Series", 10004),
-        Row("Guangdong Province", "6Series", 100038),
-        Row("Guangdong Province", "7Series", 10000),
-        Row("Guangdong Province", "8Series", 100039),
-        Row("Guangdong Province", "9Series", 100043),
-        Row("Hubei Province", "0Series", 10002),
-        Row("Hubei Province", "1Series", 100005),
-        Row("Hubei Province", "2Series", 100050),
-        Row("Hubei Province", "3Series", 100077),
-        Row("Hubei Province", "4Series", 100004),
-        Row("Hubei Province", "5Series", 1000),
-        Row("Hubei Province", "6Series", 100056),
-        Row("Hubei Province", "7Series", 1),
-        Row("Hubei Province", "8Series", 100018),
-        Row("Hubei Province", "9Series", 100000),
-        Row("Hunan Province", "0Series", 100001),
-        Row("Hunan Province", "1Series", 100013),
-        Row("Hunan Province", "2Series", 10001),
-        Row("Hunan Province", "3Series", 100010),
-        Row("Hunan Province", "4Series", 100012),
-        Row("Hunan Province", "5Series", 100),
-        Row("Hunan Province", "6Series", 100006),
-        Row("Hunan Province", "7Series", 10003),
-        Row("Hunan Province", "8Series", 10005),
-        Row("Hunan Province", "9Series", 100007)
-      )
+      sql("select imei,series,gamePointId from Carbon_automation_test2 limit 10"),
+      sql("select imei,series,gamePointId from Carbon_automation_hive2 limit 10")
+
+    )
+  }
+  )
+
+  //TC_174
+  test("select distinct gamePointId from Carbon_automation_test2")({
+    checkAnswer(
+      sql("select distinct gamePointId from Carbon_automation_test2"),
+      sql("select distinct gamePointId from Carbon_automation_hive2")
+
+    )
+  }
+  )
+
+  //TC_188
+  test("select series,gamePointId as a from Carbon_automation_test2  order by a asc limit 10")({
+    checkAnswer(
+      sql("select series,gamePointId as a from Carbon_automation_test2  order by a asc limit 10"),
+      sql("select series,gamePointId as a from Carbon_automation_hive2  order by a asc limit 10")
+
+    )
+  }
+  )
+
+  //TC_189
+  test("select series,gamePointId as a from Carbon_automation_test2  order by a desc limit 10")({
+    checkAnswer(
+      sql("select series,gamePointId as a from Carbon_automation_test2  order by a desc limit 10"),
+      sql("select series,gamePointId as a from Carbon_automation_hive2  order by a desc limit 10")
+
     )
   }
   )
 
-  //TC_154
+  //TC_192
   test(
-    "select deliveryProvince,series,min(channelsId) a from Carbon_automation_test2 group by " +
-      "deliveryProvince,series order by deliveryProvince,series"
+    "select imei from Carbon_automation_test2 where  (contractNumber == 5281803) and " +
+      "(gamePointId==2738.5621) "
   )({
     checkAnswer(
       sql(
-        "select deliveryProvince,series,min(channelsId) a from Carbon_automation_test2 group by " +
-          "deliveryProvince,series order by deliveryProvince,series"
-      ),
-      Seq(Row("Guangdong Province", "0Series", "1"),
-        Row("Guangdong Province", "1Series", "7"),
-        Row("Guangdong Province", "2Series", "6"),
-        Row("Guangdong Province", "3Series", "1"),
-        Row("Guangdong Province", "4Series", "7"),
-        Row("Guangdong Province", "5Series", "1"),
-        Row("Guangdong Province", "6Series", "3"),
-        Row("Guangdong Province", "7Series", "1"),
-        Row("Guangdong Province", "8Series", "1"),
-        Row("Guangdong Province", "9Series", "6"),
-        Row("Hubei Province", "0Series", "3"),
-        Row("Hubei Province", "1Series", "1"),
-        Row("Hubei Province", "2Series", "1"),
-        Row("Hubei Province", "3Series", "6"),
-        Row("Hubei Province", "4Series", "2"),
-        Row("Hubei Province", "5Series", "3"),
-        Row("Hubei Province", "6Series", "5"),
-        Row("Hubei Province", "7Series", "1"),
-        Row("Hubei Province", "8Series", "4"),
-        Row("Hubei Province", "9Series", "6"),
-        Row("Hunan Province", "0Series", "2"),
-        Row("Hunan Province", "1Series", "6"),
-        Row("Hunan Province", "2Series", "5"),
-        Row("Hunan Province", "3Series", "3"),
-        Row("Hunan Province", "4Series", "1"),
-        Row("Hunan Province", "5Series", "3"),
-        Row("Hunan Province", "6Series", "2"),
-        Row("Hunan Province", "7Series", "3"),
-        Row("Hunan Province", "8Series", "1"),
-        Row("Hunan Province", "9Series", "1")
+        "select imei from Carbon_automation_test2 where  (contractNumber == 5281803) and " +
+          "(gamePointId==2738.5621)"
+      ), sql(
+        "select imei from Carbon_automation_hive2 where  (contractNumber == 5281803) and " +
+          "(gamePointId==2738.5621)"
       )
     )
   }
   )
 
-  //TC_155
+  //TC_200
   test(
-    "select deliveryProvince,series,min(bomCode) a from Carbon_automation_test2 group by " +
-      "deliveryProvince,series order by deliveryProvince,series"
+    "select contractNumber,gamePointId,series  from Carbon_automation_test2 where " +
+      "(deviceInformationId=100 and deviceColor='1Device Color') OR (deviceInformationId=10 and " +
+      "deviceColor='0Device Color')"
   )({
     checkAnswer(
       sql(
-        "select deliveryProvince,series,min(bomCode) a from Carbon_automation_test2 group by " +
-          "deliveryProvince,series order by deliveryProvince,series"
-      ),
-      Seq(Row("Guangdong Province", "0Series", "100011"),
-        Row("Guangdong Province", "1Series", "100032"),
-        Row("Guangdong Province", "2Series", "100034"),
-        Row("Guangdong Province", "3Series", "100042"),
-        Row("Guangdong Province", "4Series", "100059"),
-        Row("Guangdong Province", "5Series", "100020"),
-        Row("Guangdong Province", "6Series", "100038"),
-        Row("Guangdong Province", "7Series", "10000"),
-        Row("Guangdong Province", "8Series", "100039"),
-        Row("Guangdong Province", "9Series", "100043"),
-        Row("Hubei Province", "0Series", "100009"),
-        Row("Hubei Province", "1Series", "100005"),
-        Row("Hubei Province", "2Series", "100050"),
-        Row("Hubei Province", "3Series", "100077"),
-        Row("Hubei Province", "4Series", "100004"),
-        Row("Hubei Province", "5Series", "1000"),
-        Row("Hubei Province", "6Series", "100056"),
-        Row("Hubei Province", "7Series", "1"),
-        Row("Hubei Province", "8Series", "100018"),
-        Row("Hubei Province", "9Series", "100000"),
-        Row("Hunan Province", "0Series", "100001"),
-        Row("Hunan Province", "1Series", "100013"),
-        Row("Hunan Province", "2Series", "10001"),
-        Row("Hunan Province", "3Series", "100010"),
-        Row("Hunan Province", "4Series", "100012"),
-        Row("Hunan Province", "5Series", "100"),
-        Row("Hunan Province", "6Series", "100006"),
-        Row("Hunan Province", "7Series", "10003"),
-        Row("Hunan Province", "8Series", "100008"),
-        Row("Hunan Province", "9Series", "100007")
-      )
-    )
+        "select contractNumber,gamePointId,series  from Carbon_automation_test2 where " +
+          "(deviceInformationId=100 and deviceColor='1Device Color') OR (deviceInformationId=10 " +
+          "and deviceColor='0Device Color')"
+      ), sql(
+        "select contractNumber,gamePointId,series  from Carbon_automation_hive2 where " +
+          "(deviceInformationId=100 and deviceColor='1Device Color') OR (deviceInformationId=10 " +
+          "and deviceColor='0Device Color')"
+      ))
   }
   )
 
-  //TC_156
+  //TC_201
   test(
-    "select series,max(gamePointId) a from Carbon_automation_test2 group by series order by series"
+    "select contractNumber,gamePointId,series from Carbon_automation_test2 where series !='8Series'"
   )({
     checkAnswer(
       sql(
-        "select series,max(gamePointId) a from Carbon_automation_test2 group by series order by " +
-          "series"
-      ),
-      Seq(Row("0Series", 2972.0),
-        Row("1Series", 2593.0),
-        Row("2Series", 2553.0),
-        Row("3Series", 2745.0),
-        Row("4Series", 2970.0),
-        Row("5Series", 2849.0),
-        Row("6Series", 2572.0),
-        Row("7Series", 2738.562),
-        Row("8Series", 2078.0),
-        Row("9Series", 2952.0)
+        "select contractNumber,gamePointId,series from Carbon_automation_test2 where series " +
+          "!='8Series'"
+      ), sql(
+        "select contractNumber,gamePointId,series from Carbon_automation_hive2 where series " +
+          "!='8Series'"
       )
+
     )
   }
   )
 
-  //TC_157
+  //TC_202
   test(
-    "select deliveryCountry,deliveryProvince,series,max(gamePointId) a from " +
-      "Carbon_automation_test2 group by deliveryCountry,deliveryProvince,series order by " +
-      "deliveryCountry,deliveryProvince,series"
+    "select contractNumber,gamePointId,series from Carbon_automation_test2 where series " +
+      "!='8Series' and internalModels !='8Internal models'"
   )({
     checkAnswer(
       sql(
-        "select deliveryCountry,deliveryProvince,series,max(gamePointId) a from " +
-          "Carbon_automation_test2 group by deliveryCountry,deliveryProvince,series order by " +
-          "deliveryCountry,deliveryProvince,series"
-      ),
-      Seq(Row("Chinese", "Guangdong Province", "0Series", 2890.0),
-        Row("Chinese", "Guangdong Province", "1Series", 1053.0),
-        Row("Chinese", "Guangdong Province", "2Series", 2061.0),
-        Row("Chinese", "Guangdong Province", "3Series", 2745.0),
-        Row("Chinese", "Guangdong Province", "4Series", 1337.0),
-        Row("Chinese", "Guangdong Province", "5Series", 2734.0),
-        Row("Chinese", "Guangdong Province", "6Series", 1229.0),
-        Row("Chinese", "Guangdong Province", "7Series", 2175.0),
-        Row("Chinese", "Guangdong Province", "8Series", 1750.0),
-        Row("Chinese", "Guangdong Province", "9Series", 954.0),
-        Row("Chinese", "Hubei Province", "0Series", 2972.0),
-        Row("Chinese", "Hubei Province", "1Series", 2593.0),
-        Row("Chinese", "Hubei Province", "2Series", 1655.0),
-        Row("Chinese", "Hubei Province", "3Series", 2077.0),
-        Row("Chinese", "Hubei Province", "4Series", 2970.0),
-        Row("Chinese", "Hubei Province", "5Series", 692.0),
-        Row("Chinese", "Hubei Province", "6Series", 907.0),
-        Row("Chinese", "Hubei Province", "7Series", 2738.562),
-        Row("Chinese", "Hubei Province", "8Series", 2078.0),
-        Row("Chinese", "Hubei Province", "9Series", 2952.0),
-        Row("Chinese", "Hunan Province", "0Series", 2436.0),
-        Row("Chinese", "Hunan Province", "1Series", 355.0),
-        Row("Chinese", "Hunan Province", "2Series", 2553.0),
-        Row("Chinese", "Hunan Province", "3Series", 1873.0),
-        Row("Chinese", "Hunan Province", "4Series", 2863.0),
-        Row("Chinese", "Hunan Province", "5Series", 2849.0),
-        Row("Chinese", "Hunan Province", "6Series", 2572.0),
-        Row("Chinese", "Hunan Province", "7Series", 2071.0),
-        Row("Chinese", "Hunan Province", "8Series", 1608.0),
-        Row("Chinese", "Hunan Province", "9Series", 2288.0)
+        "select contractNumber,gamePointId,series from Carbon_automation_test2 where series " +
+          "!='8Series' and internalModels !='8Internal models'"
+      ), sql(
+        "select contractNumber,gamePointId,series from Carbon_automation_hive2 where series " +
+          "!='8Series' and internalModels !='8Internal models'"
       )
+
     )
   }
   )
 
-  //TC_158
+  //TC_207
   test(
-    "select deliveryProvince,series,max(deviceInformationId) a from Carbon_automation_test2 group" +
-      " by deliveryProvince,series order by deliveryProvince,series"
+    "select contractNumber,gamePointId,series from Carbon_automation_test2 where gamePointId " +
+      ">2738.562"
   )({
     checkAnswer(
       sql(
-        "select deliveryProvince,series,max(deviceInformationId) a from Carbon_automation_test2 " +
-          "group by deliveryProvince,series order by deliveryProvince,series"
-      ),
-      Seq(Row("Guangdong Province", "0Series", 100084),
-        Row("Guangdong Province", "1Series", 100032),
-        Row("Guangdong Province", "2Series", 100051),
-        Row("Guangdong Province", "3Series", 100075),
-        Row("Guangdong Province", "4Series", 100059),
-        Row("Guangdong Province", "5Series", 100081),
-        Row("Guangdong Province", "6Series", 100038),
-        Row("Guangdong Province", "7Series", 100054),
-        Row("Guangdong Province", "8Series", 100068),
-        Row("Guangdong Province", "9Series", 100080),
-        Row("Hubei Province", "0Series", 100076),
-        Row("Hubei Province", "1Series", 100005),
-        Row("Hubei Province", "2Series", 100078),
-        Row("Hubei Province", "3Series", 100077),
-        Row("Hubei Province", "4Series", 100067),
-        Row("Hubei Province", "5Series", 1000),
-        Row("Hubei Province", "6Series", 100074),
-        Row("Hubei Province", "7Series", 1000000),
-        Row("Hubei Province", "8Series", 100040),
-        Row("Hubei Province", "9Series", 100062),
-        Row("Hunan Province", "0Series", 100083),
-        Row("Hunan Province", "1Series", 100013),
-        Row("Hunan Province", "2Series", 100045),
-        Row("Hunan Province", "3Series", 100016),
-        Row("Hunan Province", "4Series", 100079),
-        Row("Hunan Province", "5Series", 100082),
-        Row("Hunan Province", "6Series", 100066),
-        Row("Hunan Province", "7Series", 100037),
-        Row("Hunan Province", "8Series", 100069),
-        Row("Hunan Province", "9Series", 100057)
+        "select contractNumber,gamePointId,series from Carbon_automation_test2 where gamePointId " +
+          ">2738.562"
+      ), sql(
+        "select contractNumber,gamePointId,series from Carbon_automation_hive2 where gamePointId " +
+          ">2738.562"
       )
+
     )
   }
   )
 
-  //TC_159
+  //TC_217
   test(
-    "select deliveryProvince,series,max(channelsId) a from Carbon_automation_test2 group by " +
-      "deliveryProvince,series order by deliveryProvince,series"
+    "select imei, Latest_DAY from Carbon_automation_test2 where Latest_DAY BETWEEN Latest_areaId " +
+      "AND  Latest_HOUR"
   )({
     checkAnswer(
       sql(
-        "select deliveryProvince,series,max(channelsId) a from Carbon_automation_test2 group by " +
-          "deliveryProvince,series order by deliveryProvince,series"
-      ),
-      Seq(Row("Guangdong Province", "0Series", "6"),
-        Row("Guangdong Province", "1Series", "7"),
-        Row("Guangdong Province", "2Series", "7"),
-        Row("Guangdong Province", "3Series", "6"),
-        Row("Guangdong Province", "4Series", "7"),
-        Row("Guangdong Province", "5Series", "7"),
-        Row("Guangdong Province", "6Series", "3"),
-        Row("Guangdong Province", "7Series", "2"),
-        Row("Guangdong Province", "8Series", "7"),
-        Row("Guangdong Province", "9Series", "6"),
-        Row("Hubei Province", "0Series", "7"),
-        Row("Hubei Province", "1Series", "1"),
-        Row("Hubei Province", "2Series", "5"),
-        Row("Hubei Province", "3Series", "6"),
-        Row("Hubei Province", "4Series", "7"),
-        Row("Hubei Province", "5Series", "3"),
-        Row("Hubei Province", "6Series", "7"),
-        Row("Hubei Province", "7Series", "7"),
-        Row("Hubei Province", "8Series", "7"),
-        Row("Hubei Province", "9Series", "6"),
-        Row("Hunan Province", "0Series", "7"),
-        Row("Hunan Province", "1Series", "6"),
-        Row("Hunan Province", "2Series", "6"),
-        Row("Hunan Province", "3Series", "6"),
-        Row("Hunan Province", "4Series", "7"),
-        Row("Hunan Province", "5Series", "7"),
-        Row("Hunan Province", "6Series", "7"),
-        Row("Hunan Province", "7Series", "6"),
-        Row("Hunan Province", "8Series", "5"),
-        Row("Hunan Province", "9Series", "6")
+        "select imei, Latest_DAY from Carbon_automation_test2 where Latest_DAY BETWEEN " +
+          "Latest_areaId AND  Latest_HOUR"
+      ), sql(
+        "select imei, Latest_DAY from Carbon_automation_hive2 where Latest_DAY BETWEEN " +
+          "Latest_areaId AND  Latest_HOUR"
       )
+
+
     )
   }
   )
 
-  //TC_160
+  //TC_221
   test(
-    "select deliveryProvince,series,max(bomCode) a from Carbon_automation_test2 group by " +
-      "deliveryProvince,series order by deliveryProvince,series"
+    "select imei, Latest_DAY from Carbon_automation_test2 where Latest_DAY NOT LIKE Latest_areaId" +
+      " AND Latest_DAY NOT LIKE  Latest_HOUR"
   )({
     checkAnswer(
       sql(
-        "select deliveryProvince,series,max(bomCode) a from Carbon_automation_test2 group by " +
-          "deliveryProvince,series order by deliveryProvince,series"
-      ),
-      Seq(Row("Guangdong Province", "0Series", "100084"),
-        Row("Guangdong Province", "1Series", "100032"),
-        Row("Guangdong Province", "2Series", "100051"),
-        Row("Guangdong Province", "3Series", "100075"),
-        Row("Guangdong Province", "4Series", "100059"),
-        Row("Guangdong Province", "5Series", "100081"),
-        Row("Guangdong Province", "6Series", "100038"),
-        Row("Guangdong Province", "7Series", "100054"),
-        Row("Guangdong Province", "8Series", "100068"),
-        Row("Guangdong Province", "9Series", "100080"),
-        Row("Hubei Province", "0Series", "100076"),
-        Row("Hubei Province", "1Series", "100005"),
-        Row("Hubei Province", "2Series", "100078"),
-        Row("Hubei Province", "3Series", "100077"),
-        Row("Hubei Province", "4Series", "100067"),
-        Row("Hubei Province", "5Series", "1000"),
-        Row("Hubei Province", "6Series", "100074"),
-        Row("Hubei Province", "7Series", "100055"),
-        Row("Hubei Province", "8Series", "100040"),
-        Row("Hubei Province", "9Series", "100062"),
-        Row("Hunan Province", "0Series", "100083"),
-        Row("Hunan Province", "1Series", "100013"),
-        Row("Hunan Province", "2Series", "100045"),
-        Row("Hunan Province", "3Series", "100016"),
-        Row("Hunan Province", "4Series", "100079"),
-        Row("Hunan Province", "5Series", "100082"),
-        Row("Hunan Province", "6Series", "100066"),
-        Row("Hunan Province", "7Series", "100037"),
-        Row("Hunan Province", "8Series", "10007"),
-        Row("Hunan Province", "9Series", "100057")
+        "select imei, Latest_DAY from Carbon_automation_test2 where Latest_DAY NOT LIKE " +
+          "Latest_areaId AND Latest_DAY NOT LIKE  Latest_HOUR"
+      ), sql(
+        "select imei, Latest_DAY from Carbon_automation_hive2 where Latest_DAY NOT LIKE " +
+          "Latest_areaId AND Latest_DAY NOT LIKE  Latest_HOUR"
       )
+
     )
   }
   )
 
-  //TC_169
-  test("select imei,series,gamePointId from Carbon_automation_test2 limit 10")({
+  //TC_225
+  test("select imei,gamePointId from Carbon_automation_test2 where gamePointId >505")({
     checkAnswer(
-      sql("select imei,series,gamePointId from Carbon_automation_test2 limit 10"),
-      Seq(Row("1AA1", "7Series", 2738.562),
-        Row("1AA10", "7Series", 1714.635),
-        Row("1AA100", "5Series", 1271.0),
-        Row("1AA1000", "5Series", 692.0),
-        Row("1AA10000", "7Series", 2175.0),
-        Row("1AA100000", "9Series", 136.0),
-        Row("1AA1000000", "7Series", 1600.0),
-        Row("1AA100001", "0Series", 505.0),
-        Row("1AA100002", "0Series", 1341.0),
-        Row("1AA100003", "5Series", 2239.0)
-      )
+      sql("select imei,gamePointId from Carbon_automation_test2 where gamePointId >505"),
+      sql("select imei,gamePointId from Carbon_automation_hive2 where gamePointId >505")
+
     )
   }
   )
 
-  //TC_174
-  test("select distinct gamePointId from Carbon_automation_test2")({
+  //TC_226
+  test("select imei,gamePointId from Carbon_automation_test2 where gamePointId <505")({
     checkAnswer(
-      sql("select distinct gamePointId from Carbon_automation_test2"),
-      Seq(Row(1350.0),
-        Row(412.0),
-        Row(2952.0),
-        Row(2077.0),
-        Row(1750.0),
-        Row(1600.0),
-        Row(2436.0),
-        Row(2061.0),
-        Row(1442.0),
-        Row(1717.0),
-        Row(1567.0),
-        Row(1434.0),
-        Row(2745.0),
-        Row(954.0),
-        Row(2970.0),
-        Row(1226.0),
-        Row(750.0),
-        Row(256.0),
-        Row(2488.0),
-        Row(1768.0),
-        Row(1368.0),
-        Row(571.0),
-        Row(2863.0),
-        Row(79.0),
-        Row(2288.0),
-        Row(2972.0),
-        Row(2572.0),
-        Row(692.0),
-        Row(1077.0),
-        Row(613.0),
-        Row(813.0),
-        Row(538.0),
-        Row(2890.0),
-        Row(202.0),
-        Row(448.0),
-        Row(298.0),
-        Row(2399.0),
-        Row(2849.0),
-        Row(2224.0),
-        Row(151.0),
-        Row(1778.0),
-        Row(2483.0),
-        Row(901.0),
-        Row(1053.0),
-        Row(1728.0),
-        Row(2192.0),
-        Row(2142.0),
-        Row(572.0),
-        Row(29.0),
-        Row(1337.0),
-        Row(568.0),
-        Row(2826.0),
-        Row(2738.562),
-        Row(2635.0),
-        Row(1229.0),
-        Row(1271.0),
-        Row(2194.0),
-        Row(760.0),
-        Row(2553.0),
-        Row(2078.0),
-        Row(2478.0),
-        Row(1655.0),
-        Row(1080.0),
-        Row(505.0),
-        Row(355.0),
-        Row(1697.0),
-        Row(2071.0),
-        Row(2205.0),
-        Row(1864.0),
-        Row(1015.0),
-        Row(2239.0),
-        Row(865.0),
-        Row(1873.0),
-        Row(1098.0),
-        Row(2348.0),
-        Row(1823.0),
-        Row(1973.0),
-        Row(2507.0),
-        Row(732.0),
-        Row(907.0),
-        Row(1714.635),
-        Row(1407.0),
-        Row(1724.0),
-        Row(1999.0),
-        Row(2175.0),
-        Row(1991.0),
-        Row(1691.0),
-        Row(441.0),
-        Row(136.0),
-        Row(1341.0),
-        Row(845.0),
-        Row(2734.0),
-        Row(1841.0),
-        Row(1491.0),
-        Row(1333.0),
-        Row(2593.0),
-        Row(1608.0)
-      )
+      sql("select imei,gamePointId from Carbon_automation_test2 where gamePointId <505"),
+      sql("select imei,gamePointId from Carbon_automation_hive2 where gamePointId <505")
+
     )
   }
   )
 
-  //TC_188
-  test("select series,gamePointId as a from Carbon_automation_test2  order by a asc limit 10")({
+  //TC_229
+  test("select imei,gamePointId from Carbon_automation_test2 where gamePointId >=505")({
     checkAnswer(
-      sql("select series,gamePointId as a from Carbon_automation_test2  order by a asc limit 10"),
-      Seq(Row("2Series", 29.0),
-        Row("3Series", 79.0),
-        Row("9Series", 136.0),
-        Row("5Series", 151.0),
-        Row("0Series", 202.0),
-        Row("5Series", 256.0),
-        Row("2Series", 298.0),
-        Row("1Series", 355.0),
-        Row("8Series", 412.0),
-        Row("8Series", 441.0)
-      )
+      sql("select imei,gamePointId from Carbon_automation_test2 where gamePointId >=505"),
+      sql("select imei,gamePointId from Carbon_automation_hive2 where gamePointId >=505")
+
     )
   }
   )
 
-  //TC_189
-  test("select series,gamePointId as a from Carbon_automation_test2  order by a desc limit 10")({
+  //TC_230
+  test("select imei,gamePointId from Carbon_automation_test2 where gamePointId <=505")({
     checkAnswer(
-      sql("select series,gamePointId as a from Carbon_automation_test2  order by a desc limit 10"),
-      Seq(Row("0Series", 2972.0),
-        Row("4Series", 2970.0),
-        Row("9Series", 2952.0),
-        Row("0Series", 2890.0),
-        Row("4Series", 2863.0),
-        Row("5Series", 2849.0),
-        Row("0Series", 2826.0),
-        Row("3Series", 2745.0),
-        Row("7Series", 2738.562),
-        Row("5Series", 2734.0)
-      )
+      sql("select imei,gamePointId from Carbon_automation_test2 where gamePointId <=505"),
+      sql("select imei,gamePointId from Carbon_automation_hive2 where gamePointId <=505")
+
     )
   }
   )
 
-  //TC_192
+  //TC_241
   test(
-    "select imei from Carbon_automation_test2 where  (contractNumber == 5281803) and " +
-      "(gamePointId==2738.562)1 "
+    "select imei from Carbon_automation_test2 where  (contractNumber == 5281803) OR " +
+      "(gamePointId==2738.562) order by contractNumber"
   )({
     checkAnswer(
       sql(
-        "select imei from Carbon_automation_test2 where  (contractNumber == 5281803) and " +
-          "(gamePointId==2738.562)"
-      ),
-      Seq(Row("1AA1"))
+        "select imei from Carbon_automation_test2 where  (contractNumber == 5281803) OR " +
+          "(gamePointId==2738.562) order by contractNumber"
+      ), sql(
+        "select imei from Carbon_automation_hive2 where  (contractNumber == 5281803) OR " +
+          "(gamePointId==2738.562) order by contractNumber"
+      )
     )
   }
   )
 
-  //TC_193
+  //TC_242
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where  (contractNumber" +
-      " == 5281803) and (gamePointId==2738.562)"
+    "select channelsId from Carbon_automation_test2 where  (channelsId == '4') OR " +
+      "(gamePointId==2738.562) order by channelsId"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where  " +
-          "(contractNumber == 5281803) and (gamePointId==2738.562)"
-      ),
-      Seq(Row(5281803.0, 2738.562, "7Series"))
+        "select channelsId from Carbon_automation_test2 where  (channelsId == '4') OR " +
+          "(gamePointId==2738.562) order by channelsId"
+      ), sql(
+        "select channelsId from Carbon_automation_hive2 where  (channelsId == '4') OR " +
+          "(gamePointId==2738.562) order by channelsId"
+      )
+
     )
   }
   )
 
-  //TC_194
+
+
+  //TC_244
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where series='8Series'"
+    "select imei, gamePointId from Carbon_automation_test2 where contractNumber in (5281803) and " +
+      "gamePointId IN (2738.562) ORDER BY gamePointId"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where " +
-          "series='8Series'"
-      ),
-      Seq(Row(1070757.0, 1442.0, "8Series"),
-        Row(574375.0, 441.0, "8Series"),
-        Row(8229807.0, 760.0, "8Series"),
-        Row(1901889.0, 1750.0, "8Series"),
-        Row(7880439.0, 2078.0, "8Series"),
-        Row(5659107.0, 1697.0, "8Series"),
-        Row(6190068.0, 1608.0, "8Series"),
-        Row(7420815.0, 538.0, "8Series"),
-        Row(3235086.0, 412.0, "8Series"),
-        Row(7917206.0, 1491.0, "8Series"),
-        Row(4156339.0, 1350.0, "8Series")
+        "select imei, gamePointId from Carbon_automation_test2 where contractNumber in (5281803) " +
+          "and gamePointId IN (2738.562) ORDER BY gamePointId"
+      ), sql(
+        "select imei, gamePointId from Carbon_automation_hive2 where contractNumber in (5281803) " +
+          "and gamePointId IN (2738.562) ORDER BY gamePointId"
       )
     )
   }
   )
 
-  //TC_195
+  //TC_245
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where series='8Series'" +
-      " and internalModels='8Internal models'"
+    "select channelsId from Carbon_automation_test2 where  channelsId in ('4') or gamePointId IN " +
+      "(2738.562) ORDER BY channelsId"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where " +
-          "series='8Series' and internalModels='8Internal models'"
-      ),
-      Seq(Row(1070757.0, 1442.0, "8Series"), Row(7880439.0, 2078.0, "8Series"))
-    )
+        "select channelsId from Carbon_automation_test2 where  channelsId in ('4') or gamePointId" +
+          " IN (2738.562) ORDER BY channelsId"
+      ), sql(
+        "select channelsId from Carbon_automation_hive2 where  channelsId in ('4') or gamePointId" +
+          " IN (2738.562) ORDER BY channelsId"
+      )
+
+    )
   }
   )
 
-  //TC_196
+  //TC_246
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where series='8Series'" +
-      " or  internalModels='8Internal models'"
+    "select deliveryCity from Carbon_automation_test2 where  deliveryCity IN ('yichang') AND  " +
+      "deliveryStreet IN ('yichang') ORDER BY deliveryCity"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where " +
-          "series='8Series' or  internalModels='8Internal models'"
-      ),
-      Seq(Row(88231.0, 2239.0, "5Series"),
-        Row(335583.0, 1991.0, "9Series"),
-        Row(1070757.0, 1442.0, "8Series"),
-        Row(574375.0, 441.0, "8Series"),
-        Row(833654.0, 256.0, "5Series"),
-        Row(6533899.0, 1724.0, "0Series"),
-        Row(8229807.0, 760.0, "8Series"),
-        Row(1901889.0, 1750.0, "8Series"),
-        Row(7880439.0, 2078.0, "8Series"),
-        Row(5659107.0, 1697.0, "8Series"),
-        Row(7839922.0, 1823.0, "9Series"),
-        Row(9500486.0, 2399.0, "3Series"),
-        Row(6190068.0, 1608.0, "8Series"),
-        Row(7236919.0, 1407.0, "2Series"),
-        Row(7342321.0, 1728.0, "7Series"),
-        Row(7420815.0, 538.0, "8Series"),
-        Row(9318234.0, 1226.0, "2Series"),
-        Row(3235086.0, 412.0, "8Series"),
-        Row(7917206.0, 1491.0, "8Series"),
-        Row(4156339.0, 1350.0, "8Series")
+        "select deliveryCity from Carbon_automation_test2 where  deliveryCity IN ('yichang') AND " +
+          " deliveryStreet IN ('yichang') ORDER BY deliveryCity"
+      ), sql(
+        "select deliveryCity from Carbon_automation_hive2 where  deliveryCity IN ('yichang') AND " +
+          " deliveryStreet IN ('yichang') ORDER BY deliveryCity"
       )
+
     )
   }
   )
 
-  //TC_197
+  //TC_247
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where series='8Series'" +
-      " or series='7Series'"
+    "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  channelsId > " +
+      "4 ORDER BY gamePointId limit 5"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where " +
-          "series='8Series' or series='7Series'"
-      ),
-      Seq(Row(5281803.0, 2738.562, "7Series"),
-        Row(6805600.0, 1714.635, "7Series"),
-        Row(3784858.0, 2175.0, "7Series"),
-        Row(9737768.0, 1600.0, "7Series"),
-        Row(1070757.0, 1442.0, "8Series"),
-        Row(574375.0, 441.0, "8Series"),
-        Row(7487134.0, 1768.0, "7Series"),
-        Row(5586718.0, 2071.0, "7Series"),
-        Row(5857263.0, 1333.0, "7Series"),
-        Row(6416074.0, 1080.0, "7Series"),
-        Row(8229807.0, 760.0, "8Series"),
-        Row(3311312.0, 1015.0, "7Series"),
-        Row(1901889.0, 1750.0, "8Series"),
-        Row(7880439.0, 2078.0, "8Series"),
-        Row(5659107.0, 1697.0, "8Series"),
-        Row(6190068.0, 1608.0, "8Series"),
-        Row(6283156.0, 1368.0, "7Series"),
-        Row(7342321.0, 1728.0, "7Series"),
-        Row(7420815.0, 538.0, "8Series"),
-        Row(3235086.0, 412.0, "8Series"),
-        Row(7917206.0, 1491.0, "8Series"),
-        Row(4156339.0, 1350.0, "8Series")
+        "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  " +
+          "channelsId > 4 ORDER BY gamePointId limit 5"
+      ), sql(
+        "select imei,gamePointId, channelsId,series from Carbon_automation_hive2 where  " +
+          "channelsId > 4 ORDER BY gamePointId limit 5"
       )
+
     )
   }
   )
 
-  //TC_198
+  //TC_248
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where gamePointId=2738" +
-      ".562"
+    "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  channelsId < " +
+      "4 ORDER BY gamePointId limit 5"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where " +
-          "gamePointId=2738.562"
-      ),
-      Seq(Row(5281803.0, 2738.562, "7Series"))
+        "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  " +
+          "channelsId < 4 ORDER BY gamePointId limit 5"
+      ), sql(
+        "select imei,gamePointId, channelsId,series from Carbon_automation_hive2 where  " +
+          "channelsId < 4 ORDER BY gamePointId limit 5"
+      )
+
     )
   }
   )
 
-  //TC_199
+  //TC_249
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where " +
-      "deviceInformationId=10"
+    "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  channelsId >=" +
+      " 4 ORDER BY gamePointId limit 5"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where " +
-          "deviceInformationId=10"
-      ),
-      Seq(Row(6805600.0, 1714.635, "7Series"))
+        "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  " +
+          "channelsId >= 4 ORDER BY gamePointId limit 5"
+      ), sql(
+        "select imei,gamePointId, channelsId,series from Carbon_automation_hive2 where  " +
+          "channelsId >= 4 ORDER BY gamePointId limit 5"
+      )
+
     )
   }
   )
 
-  //TC_200
+  //TC_250
   test(
-    "select contractNumber,gamePointId,series  from Carbon_automation_test2 where " +
-      "(deviceInformationId=100 and deviceColor='1Device Color') OR (deviceInformationId=10 and " +
-      "deviceColor='0Device Color')"
+    "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  channelsId <=" +
+      " 4 ORDER BY gamePointId limit 5"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series  from Carbon_automation_test2 where " +
-          "(deviceInformationId=100 and deviceColor='1Device Color') OR (deviceInformationId=10 " +
-          "and deviceColor='0Device Color')"
-      ),
-      Seq(Row(6805600.0, 1714.635, "7Series"), Row(8231335.0, 1271.0, "5Series"))
+        "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  " +
+          "channelsId <= 4 ORDER BY gamePointId limit 5"
+      ), sql(
+        "select imei,gamePointId, channelsId,series from Carbon_automation_hive2 where  " +
+          "channelsId <= 4 ORDER BY gamePointId limit 5"
+      )
+
     )
   }
   )
 
-  //TC_201
+  //TC_251
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where series !='8Series'"
+    "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  channelsId " +
+      "BETWEEN 4 AND 5 ORDER BY gamePointId limit 5"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where series " +
-          "!='8Series'"
-      ),
-      Seq(Row(5281803.0, 2738.562, "7Series"),
-        Row(6805600.0, 1714.635, "7Series"),
-        Row(8231335.0, 1271.0, "5Series"),
-        Row(8978765.0, 692.0, "5Series"),
-        Row(3784858.0, 2175.0, "7Series"),
-        Row(1602458.0, 136.0, "9Series"),
-        Row(9737768.0, 1600.0, "7Series"),
-        Row(2919786.0, 505.0, "0Series"),
-        Row(9455612.0, 1341.0, "0Series"),
-        Row(88231.0, 2239.0, "5Series"),
-        Row(1439363.0, 2970.0, "4Series"),
-        Row(3940720.0, 2593.0, "1Series"),
-        Row(4451217.0, 2572.0, "6Series"),
-        Row(335583.0, 1991.0, "9Series"),
-        Row(2389657.0, 1841.0, "0Series"),
-        Row(5986189.0, 298.0, "2Series"),
-        Row(8543280.0, 79.0, "3Series"),
-        Row(4816260.0, 202.0, "0Series"),
-        Row(8453995.0, 568.0, "4Series"),
-        Row(2051539.0, 355.0, "1Series"),
-        Row(7610075.0, 151.0, "5Series"),
-        Row(6663091.0, 2863.0, "4Series"),
-        Row(6495292.0, 1873.0, "3Series"),
-        Row(2611464.0, 2205.0, "9Series"),
-        Row(4459076.0, 2194.0, "5Series"),
-        Row(5204739.0, 2972.0, "0Series"),
-        Row(833654.0, 256.0, "5Series"),
-        Row(566917.0, 1778.0, "0Series"),
-        Row(832387.0, 1999.0, "5Series"),
-        Row(2850246.0, 2194.0, "5Series"),
-        Row(6169467.0, 2483.0, "6Series"),
-        Row(6533899.0, 1724.0, "0Series"),
-        Row(7487134.0, 1768.0, "7Series"),
-        Row(4750239.0, 2436.0, "0Series"),
-        Row(8880112.0, 2849.0, "5Series"),
-        Row(7774590.0, 1691.0, "2Series"),
-        Row(5586718.0, 2071.0, "7Series"),
-        Row(5857263.0, 1333.0, "7Series"),
-        Row(6416074.0, 1080.0, "7Series"),
-        Row(6994063.0, 1053.0, "1Series"),
-        Row(5797079.0, 2061.0, "2Series"),
-        Row(6283062.0, 2142.0, "5Series"),
-        Row(8431770.0, 2224.0, "5Series"),
-        Row(3311312.0, 1015.0, "7Series"),
-        Row(2843881.0, 1229.0, "6Series"),
-        Row(3077303.0, 1717.0, "5Series"),
-        Row(3454331.0, 2734.0, "5Series"),
-        Row(23250.0, 2745.0, "3Series"),
-        Row(3278167.0, 571.0, "9Series"),
-        Row(9952232.0, 2553.0, "2Series"),
-        Row(424923.0, 1077.0, "3Series"),
-        Row(7839922.0, 1823.0, "9Series"),
-        Row(9500486.0, 2399.0, "3Series"),
-        Row(1952050.0, 2890.0, "0Series"),
-        Row(7768468.0, 29.0, "2Series"),
-        Row(7236919.0, 1407.0, "2Series"),
-        Row(167725.0, 845.0, "6Series"),
-        Row(2651084.0, 1655.0, "2Series"),
-        Row(6283156.0, 1368.0, "7Series"),
-        Row(7342321.0, 1728.0, "7Series"),
-        Row(1753823.0, 750.0, "6Series"),
-        Row(5451533.0, 2288.0, "9Series"),
-        Row(5403108.0, 2635.0, "5Series"),
-        Row(168757.0, 1337.0, "4Series"),
-        Row(9394732.0, 2478.0, "3Series"),
-        Row(4358621.0, 1407.0, "6Series"),
-        Row(2362114.0, 2952.0, "9Series"),
-        Row(9318234.0, 1226.0, "2Series"),
-        Row(5565240.0, 865.0, "6Series"),
-        Row(3166724.0, 901.0, "0Series"),
-        Row(5592457.0, 1864.0, "6Series"),
-        Row(7575196.0, 572.0, "4Series"),
-        Row(4202614.0, 1567.0, "0Series"),
-        Row(2199957.0, 1973.0, "0Series"),
-        Row(511128.0, 448.0, "4Series"),
-        Row(580612.0, 2488.0, "4Series"),
-        Row(275342.0, 907.0, "6Series"),
-        Row(3215327.0, 2507.0, "3Series"),
-        Row(8069859.0, 732.0, "0Series"),
-        Row(6383562.0, 2077.0, "3Series"),
-        Row(6428516.0, 1434.0, "2Series"),
-        Row(5159121.0, 1098.0, "4Series"),
-        Row(3360388.0, 813.0, "5Series"),
-        Row(5152985.0, 954.0, "9Series"),
-        Row(3335480.0, 613.0, "5Series"),
-        Row(994815.0, 2348.0, "5Series"),
-        Row(507229.0, 2192.0, "0Series"),
-        Row(8976568.0, 2826.0, "0Series")
+        "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  " +
+          "channelsId BETWEEN 4 AND 5 ORDER BY gamePointId limit 5"
+      ), sql(
+        "select imei,gamePointId, channelsId,series from Carbon_automation_hive2 where  " +
+          "channelsId BETWEEN 4 AND 5 ORDER BY gamePointId limit 5"
       )
+
     )
   }
   )
 
-  //TC_202
+  //TC_252
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where series " +
-      "!='8Series' and internalModels !='8Internal models'"
+    "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  channelsId " +
+      "NOT BETWEEN 4 AND 5 ORDER BY gamePointId limit 5"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where series " +
-          "!='8Series' and internalModels !='8Internal models'"
-      ),
-      Seq(Row(5281803.0, 2738.562, "7Series"),
-        Row(6805600.0, 1714.635, "7Series"),
-        Row(8231335.0, 1271.0, "5Series"),
-        Row(8978765.0, 692.0, "5Series"),
-        Row(3784858.0, 2175.0, "7Series"),
-        Row(1602458.0, 136.0, "9Series"),
-        Row(9737768.0, 1600.0, "7Series"),
-        Row(2919786.0, 505.0, "0Series"),
-        Row(9455612.0, 1341.0, "0Series"),
-        Row(1439363.0, 2970.0, "4Series"),
-        Row(3940720.0, 2593.0, "1Series"),
-        Row(4451217.0, 2572.0, "6Series"),
-        Row(2389657.0, 1841.0, "0Series"),
-        Row(5986189.0, 298.0, "2Series"),
-        Row(8543280.0, 79.0, "3Series"),
-        Row(4816260.0, 202.0, "0Series"),
-        Row(8453995.0, 568.0, "4Series"),
-        Row(2051539.0, 355.0, "1Series"),
-        Row(7610075.0, 151.0, "5Series"),
-        Row(6663091.0, 2863.0, "4Series"),
-        Row(6495292.0, 1873.0, "3Series"),
-        Row(2611464.0, 2205.0, "9Series"),
-        Row(4459076.0, 2194.0, "5Series"),
-        Row(5204739.0, 2972.0, "0Series"),
-        Row(566917.0, 1778.0, "0Series"),
-        Row(832387.0, 1999.0, "5Series"),
-        Row(2850246.0, 2194.0, "5Series"),
-        Row(6169467.0, 2483.0, "6Series"),
-        Row(7487134.0, 1768.0, "7Series"),
-        Row(4750239.0, 2436.0, "0Series"),
-        Row(8880112.0, 2849.0, "5Series"),
-        Row(7774590.0, 1691.0, "2Series"),
-        Row(5586718.0, 2071.0, "7Series"),
-        Row(5857263.0, 1333.0, "7Series"),
-        Row(6416074.0, 1080.0, "7Series"),
-        Row(6994063.0, 1053.0, "1Series"),
-        Row(5797079.0, 2061.0, "2Series"),
-        Row(6283062.0, 2142.0, "5Series"),
-        Row(8431770.0, 2224.0, "5Series"),
-        Row(3311312.0, 1015.0, "7Series"),
-        Row(2843881.0, 1229.0, "6Series"),
-        Row(3077303.0, 1717.0, "5Series"),
-        Row(3454331.0, 2734.0, "5Series"),
-        Row(23250.0, 2745.0, "3Series"),
-        Row(3278167.0, 571.0, "9Series"),
-        Row(9952232.0, 2553.0, "2Series"),
-        Row(424923.0, 1077.0, "3Series"),
-        Row(1952050.0, 2890.0, "0Series"),
-        Row(7768468.0, 29.0, "2Series"),
-        Row(167725.0, 845.0, "6Series"),
-        Row(2651084.0, 1655.0, "2Series"),
-        Row(6283156.0, 1368.0, "7Series"),
-        Row(1753823.0, 750.0, "6Series"),
-        Row(5451533.0, 2288.0, "9Series"),
-        Row(5403108.0, 2635.0, "5Series"),
-        Row(168757.0, 1337.0, "4Series"),
-        Row(9394732.0, 2478.0, "3Series"),
-        Row(4358621.0, 1407.0, "6Series"),
-        Row(2362114.0, 2952.0, "9Series"),
-        Row(5565240.0, 865.0, "6Series"),
-        Row(3166724.0, 901.0, "0Series"),
-        Row(5592457.0, 1864.0, "6Series"),
-        Row(7575196.0, 572.0, "4Series"),
-        Row(4202614.0, 1567.0, "0Series"),
-        Row(2199957.0, 1973.0, "0Series"),
-        Row(511128.0, 448.0, "4Series"),
-        Row(580612.0, 2488.0, "4Series"),
-        Row(275342.0, 907.0, "6Series"),
-        Row(3215327.0, 2507.0, "3Series"),
-        Row(8069859.0, 732.0, "0Series"),
-        Row(6383562.0, 2077.0, "3Series"),
-        Row(6428516.0, 1434.0, "2Series"),
-        Row(5159121.0, 1098.0, "4Series"),
-        Row(3360388.0, 813.0, "5Series"),
-        Row(5152985.0, 954.0, "9Series"),
-        Row(3335480.0, 613.0, "5Series"),
-        Row(994815.0, 2348.0, "5Series"),
-        Row(507229.0, 2192.0, "0Series"),
-        Row(8976568.0, 2826.0, "0Series")
+        "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  " +
+          "channelsId NOT BETWEEN 4 AND 5 ORDER BY gamePointId limit 5"
+      ), sql(
+        "select imei,gamePointId, channelsId,series from Carbon_automation_hive2 where  " +
+          "channelsId NOT BETWEEN 4 AND 5 ORDER BY gamePointId limit 5"
       )
+
     )
   }
   )
 
-  //TC_203
+  //TC_253
   test(
-    "select contractNumber,gamePointId,series from Carbon_automation_test2 where series " +
-      "!='8Series' or  internalModels !='8Internal models'"
+    "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  channelsId " +
+      "LIKE 4 ORDER BY gamePointId limit 5"
   )({
     checkAnswer(
       sql(
-        "select contractNumber,gamePointId,series from Carbon_automation_test2 where series " +
-          "!='8Series' or  internalModels !='8Internal models'"
-      ),
-      Seq(Row(5281803.0, 2738.562, "7Series"),
-        Row(6805600.0, 1714.635, "7Series"),
-        Row(8231335.0, 1271.0, "5Series"),
-        Row(8978765.0, 692.0, "5Series"),
-        Row(3784858.0, 2175.0, "7Series"),
-        Row(1602458.0, 136.0, "9Series"),
-        Row(9737768.0, 1600.0, "7Series"),
-        Row(2919786.0, 505.0, "0Series"),
-        Row(9455612.0, 1341.0, "0Series"),
-        Row(88231.0, 2239.0, "5Series"),
-        Row(1439363.0, 2970.0, "4Series"),
-        Row(3940720.0, 2593.0, "1Series"),
-        Row(4451217.0, 2572.0, "6Series"),
-        Row(335583.0, 1991.0, "9Series"),
-        Row(2389657.0, 1841.0, "0Series"),
-        Row(5986189.0, 298.0, "2Series"),
-        Row(8543280.0, 79.0, "3Series"),
-        Row(4816260.0, 202.0, "0Series"),
-        Row(8453995.0, 568.0, "4Series"),
-        Row(2051539.0, 355.0, "1Series"),
-        Row(7610075.0, 151.0, "5Series"),
-        Row(6663091.0, 2863.0, "4Series"),
-        Row(6495292.0, 1873.0, "3Series"),
-        Row(2611464.0, 2205.0, "9Series"),
-        Row(574375.0, 441.0, "8Series"),
-        Row(4459076.0, 2194.0, "5Series"),
-        Row(5204739.0, 2972.0, "0Series"),
-        Row(833654.0, 256.0, "5Series"),
-        Row(566917.0, 1778.0, "0Series"),
-        Row(832387.0, 1999.0, "5Series"),
-        Row(2850246.0, 2194.0, "5Series"),
-        Row(6169467.0, 2483.0, "6Series"),
-        Row(6533899.0, 1724.0, "0Series"),
-        Row(7487134.0, 1768.0, "7Series"),
-        Row(4750239.0, 2436.0, "0Series"),
-        Row(8880112.0, 2849.0, "5Series"),
-        Row(7774590.0, 1691.0, "2Series"),
-        Row(5586718.0, 2071.0, "7Series"),
-        Row(5857263.0, 1333.0, "7Series"),
-        Row(6416074.0, 1080.0, "7Series"),
-        Row(6994063.0, 1053.0, "1Series"),
-        Row(8229807.0, 760.0, "8Series"),
-        Row(5797079.0, 2061.0, "2Series"),
-        Row(6283062.0, 2142.0, "5Series"),
-        Row(8431770.0, 2224.0, "5Series"),
-        Row(3311312.0, 1015.0, "7Series"),
-        Row(2843881.0, 1229.0, "6Series"),
-        Row(1901889.0, 1750.0, "8Series"),
-        Row(3077303.0, 1717.0, "5Series"),
-        Row(3454331.0, 2734.0, "5Series"),
-        Row(23250.0, 2745.0, "3Series"),
-        Row(3278167.0, 571.0, "9Series"),
-        Row(5659107.0, 1697.0, "8Series"),
-        Row(9952232.0, 2553.0, "2Series"),
-        Row(424923.0, 1077.0, "3Series"),
-        Row(7839922.0, 1823.0, "9Series"),
-        Row(9500486.0, 2399.0, "3Series"),
-        Row(1952050.0, 2890.0, "0Series"),
-        Row(6190068.0, 1608.0, "8Series"),
-        Row(7768468.0, 29.0, "2Series"),
-        Row(7236919.0, 1407.0, "2Series"),
-        Row(167725.0, 845.0, "6Series"),
-        Row(2651084.0, 1655.0, "2Series"),
-        Row(6283156.0, 1368.0, "7Series"),
-        Row(7342321.0, 1728.0, "7Series"),
-        Row(1753823.0, 750.0, "6Series"),
-        Row(5451533.0, 2288.0, "9Series"),
-        Row(5403108.0, 2635.0, "5Series"),
-        Row(168757.0, 1337.0, "4Series"),
-        Row(9394732.0, 2478.0, "3Series"),
-        Row(7420815.0, 538.0, "8Series"),
-        Row(4358621.0, 1407.0, "6Series"),
-        Row(2362114.0, 2952.0, "9Series"),
-        Row(9318234.0, 1226.0, "2Series"),
-        Row(5565240.0, 865.0, "6Series"),
-        Row(3166724.0, 901.0, "0Series"),
-        Row(5592457.0, 1864.0, "6Series"),
-        Row(7575196.0, 572.0, "4Series"),
-        Row(3235086.0, 412.0, "8Series"),
-        Row(7917206.0, 1491.0, "8Series"),
-        Row(4156339.0, 1350.0, "8Series"),
-        Row(4202614.0, 1567.0, "0Series"),
-        Row(2199957.0, 1973.0, "0Series"),
-        Row(511128.0, 448.0, "4Series"),
-        Row(580612.0, 2488.0, "4Series"),
-        Row(275342.0, 907.0, "6Series"),
-        Row(3215327.0, 2507.0, "3Series"),
-        Row(8069859.0, 732.0, "0Series"),
-        Row(6383562.0, 2077.0, "3Series"),
-        Row(6428516.0, 1434.0, "2Series"),
-        Row(5159121.0, 1098.0, "4Series"),
-        Row(3360388.0, 813.0, "5Series"),
-        Row(5152985.0, 954.0, "9Series"),
-        Row(3335480.0, 613.0, "5Series"),
-        Row(994815.0, 2348.0, "5Series"),
-        Row(507229.0, 2192.0, "0Series"),
-        Row(8976568.0, 2826.0, "0Series")
+        "select imei,gamePointId, channelsId,series from Carbon_automation_test2 where  " +
+          "channelsId LIKE 4 ORDER BY gamePointId limit 5"
+      ), sql(
+        "select imei,gamePointId, channelsId,series from Carbon_automation_hive2 where  " +
+          "channelsId LIKE 4 ORDER BY gamePointId

<TRUNCATED>


[3/3] incubator-carbondata git commit: [Carbondata 434] Improved integration test cases for AllDataTypesTestCase2 This closes #340

Posted by ra...@apache.org.
[Carbondata 434] Improved integration test cases for AllDataTypesTestCase2 This closes #340


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

Branch: refs/heads/master
Commit: 87f745c605e9ec64b6b5a647fa089c533370ad80
Parents: 1d8ad7d 92f7637
Author: ravipesala <ra...@gmail.com>
Authored: Mon Dec 5 18:42:28 2016 +0530
Committer: ravipesala <ra...@gmail.com>
Committed: Mon Dec 5 18:42:28 2016 +0530

----------------------------------------------------------------------
 .../spark/sql/common/util/QueryTest.scala       |    4 +-
 .../allqueries/AllDataTypesTestCase1.scala      |  261 +-
 .../allqueries/AllDataTypesTestCase2.scala      | 8022 ++----------------
 3 files changed, 922 insertions(+), 7365 deletions(-)
----------------------------------------------------------------------



[2/3] incubator-carbondata git commit: improved integration test cases for alldatatypecheckcase2

Posted by ra...@apache.org.
improved integration test cases for alldatatypecheckcase2


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

Branch: refs/heads/master
Commit: 92f7637cd9bea459b3d4e336c8ceb60f2c435ef1
Parents: 1d8ad7d
Author: anubhav100 <an...@knoldus.in>
Authored: Tue Nov 22 12:26:42 2016 +0530
Committer: ravipesala <ra...@gmail.com>
Committed: Mon Dec 5 18:41:42 2016 +0530

----------------------------------------------------------------------
 .../spark/sql/common/util/QueryTest.scala       |    4 +-
 .../allqueries/AllDataTypesTestCase1.scala      |  261 +-
 .../allqueries/AllDataTypesTestCase2.scala      | 8022 ++----------------
 3 files changed, 922 insertions(+), 7365 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/92f7637c/integration-testcases/src/test/scala/org/apache/spark/sql/common/util/QueryTest.scala
----------------------------------------------------------------------
diff --git a/integration-testcases/src/test/scala/org/apache/spark/sql/common/util/QueryTest.scala b/integration-testcases/src/test/scala/org/apache/spark/sql/common/util/QueryTest.scala
index 587013f..4faafb7 100644
--- a/integration-testcases/src/test/scala/org/apache/spark/sql/common/util/QueryTest.scala
+++ b/integration-testcases/src/test/scala/org/apache/spark/sql/common/util/QueryTest.scala
@@ -140,7 +140,7 @@ object QueryTest {
              |$e
              |${org.apache.spark.sql.catalyst.util.stackTraceToString(e)}
           """.stripMargin
-        Some(errorMessage)
+       return Some(errorMessage)
     }
 
     if (prepareAnswer(expectedAnswer) != prepareAnswer(sparkAnswer)) {
@@ -157,7 +157,7 @@ object QueryTest {
               prepareAnswer(sparkAnswer).map(_.toString())).mkString("\n")
         }
       """.stripMargin
-      Some(errorMessage)
+      return Some(errorMessage)
     }
 
     None

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/92f7637c/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase1.scala
----------------------------------------------------------------------
diff --git a/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase1.scala b/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase1.scala
index 511cc18..a16a85c 100644
--- a/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase1.scala
+++ b/integration-testcases/src/test/scala/org/apache/spark/testsuite/allqueries/AllDataTypesTestCase1.scala
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -28,9 +29,9 @@ import org.apache.carbondata.core.util.CarbonProperties
 import org.scalatest.BeforeAndAfterAll
 
 /**
-  * Test Class for all queries on multiple datatypes
-  * Manohar
-  */
+ * Test Class for all queries on multiple datatypes
+ * Manohar
+ */
 class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
 
   override def beforeAll {
@@ -126,7 +127,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
     checkAnswer(
       sql(
         "select channelsId, sum(Latest_DAY+ 10) as a from Carbon_automation_test group by  " +
-          "channelsId"
+        "channelsId"
       ),
       Seq(Row("1", 132),
         Row("2", 110),
@@ -144,12 +145,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-24
   test(
     "select channelsId, sum(channelsId+ 10)  Total from Carbon_automation_test group by  " +
-      "channelsId order by Total"
+    "channelsId order by Total"
   ) {
     checkAnswer(
       sql(
         "select channelsId, sum(channelsId+ 10)  Total from Carbon_automation_test group by  " +
-          "channelsId order by Total"
+        "channelsId order by Total"
       ),
       Seq(Row("2", 120),
         Row("1", 132),
@@ -166,12 +167,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-25
   test(
     "select channelsId, sum(channelsId+channelsId) Total from Carbon_automation_test group by  " +
-      "channelsId order by Total"
+    "channelsId order by Total"
   ) {
     checkAnswer(
       sql(
         "select channelsId, sum(channelsId+channelsId) Total from Carbon_automation_test group by" +
-          "  channelsId order by Total"
+        "  channelsId order by Total"
       ),
       Seq(Row("1", 24),
         Row("2", 40),
@@ -188,12 +189,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-26
   test(
     "select channelsId, sum(channelsId+channelsId) Total from Carbon_automation_test group by  " +
-      "channelsId"
+    "channelsId"
   ) {
     checkAnswer(
       sql(
         "select channelsId, sum(channelsId+channelsId) Total from Carbon_automation_test group by" +
-          "  channelsId"
+        "  channelsId"
       ),
       Seq(Row("1", 24),
         Row("2", 40),
@@ -214,7 +215,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
     checkAnswer(
       sql(
         "select channelsId, avg(Latest_DAY+ 10) as a from Carbon_automation_test group by  " +
-          "channelsId"
+        "channelsId"
       ),
       Seq(Row("1", 11),
         Row("2", 11),
@@ -231,12 +232,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-29
   test(
     "select channelsId, avg(channelsId+ 10)  Total from Carbon_automation_test group by  " +
-      "channelsId order by Total"
+    "channelsId order by Total"
   ) {
     checkAnswer(
       sql(
         "select channelsId, avg(channelsId+ 10)  Total from Carbon_automation_test group by  " +
-          "channelsId order by Total"
+        "channelsId order by Total"
       ),
       Seq(Row("1", 11),
         Row("2", 12),
@@ -254,12 +255,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-30
   test(
     "select channelsId, avg(channelsId+channelsId) Total from Carbon_automation_test group by  " +
-      "channelsId order by Total"
+    "channelsId order by Total"
   ) {
     checkAnswer(
       sql(
         "select channelsId, avg(channelsId+channelsId) Total from Carbon_automation_test group by" +
-          "  channelsId order by Total"
+        "  channelsId order by Total"
       ),
       Seq(Row("1", 2),
         Row("2", 4),
@@ -276,12 +277,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-31
   test(
     "select channelsId, count(Latest_DAY+ 10) as a  from Carbon_automation_test group by  " +
-      "channelsId"
+    "channelsId"
   ) {
     checkAnswer(
       sql(
         "select channelsId, count(Latest_DAY+ 10) as a  from Carbon_automation_test group by  " +
-          "channelsId"
+        "channelsId"
       ),
       Seq(Row("1", 12),
         Row("2", 10),
@@ -299,12 +300,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-33
   test(
     "select channelsId, count(channelsId+ 10) Total from Carbon_automation_test group by  " +
-      "channelsId order by channelsId"
+    "channelsId order by channelsId"
   ) {
     checkAnswer(
       sql(
         "select channelsId, count(channelsId+ 10) Total from Carbon_automation_test group by  " +
-          "channelsId order by channelsId"
+        "channelsId order by channelsId"
       ),
       Seq(Row("1", 12),
         Row("2", 10),
@@ -321,12 +322,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-34
   test(
     "select channelsId, count(channelsId+channelsId)  Total from Carbon_automation_test group by " +
-      " channelsId order by channelsId"
+    " channelsId order by channelsId"
   ) {
     checkAnswer(
       sql(
         "select channelsId, count(channelsId+channelsId)  Total from Carbon_automation_test group" +
-          " by  channelsId order by channelsId"
+        " by  channelsId order by channelsId"
       ),
       Seq(Row("1", 12),
         Row("2", 10),
@@ -347,7 +348,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
     checkAnswer(
       sql(
         "select channelsId, min(Latest_DAY+ 10) as a  from Carbon_automation_test group by  " +
-          "channelsId"
+        "channelsId"
       ),
       Seq(Row("1", 11),
         Row("2", 11),
@@ -365,12 +366,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-37
   test(
     "select channelsId, min(channelsId+ 10) Total from Carbon_automation_test group by  " +
-      "channelsId order by Total"
+    "channelsId order by Total"
   ) {
     checkAnswer(
       sql(
         "select channelsId, min(channelsId+ 10) Total from Carbon_automation_test group by  " +
-          "channelsId order by Total"
+        "channelsId order by Total"
       ),
       Seq(Row("1", 11),
         Row("2", 12),
@@ -387,12 +388,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-38
   test(
     "select channelsId, min(channelsId+channelsId)  Total from Carbon_automation_test group by  " +
-      "channelsId order by Total"
+    "channelsId order by Total"
   ) {
     checkAnswer(
       sql(
         "select channelsId, min(channelsId+channelsId)  Total from Carbon_automation_test group " +
-          "by  channelsId order by Total"
+        "by  channelsId order by Total"
       ),
       Seq(Row("1", 2),
         Row("2", 4),
@@ -413,7 +414,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
     checkAnswer(
       sql(
         "select channelsId, max(Latest_DAY+ 10) as a  from Carbon_automation_test group by  " +
-          "channelsId"
+        "channelsId"
       ),
       Seq(Row("1", 11),
         Row("2", 11),
@@ -431,13 +432,13 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-41
   test(
     "select channelsId, max(channelsId+ 10) Total from Carbon_automation_test group by  " +
-      "channelsId order by Total"
+    "channelsId order by Total"
   )({
 
     checkAnswer(
       sql(
         "select channelsId, max(channelsId+ 10) Total from Carbon_automation_test group by  " +
-          "channelsId order by Total"
+        "channelsId order by Total"
       ),
       Seq(Row("1", 11),
         Row("2", 12),
@@ -454,13 +455,13 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-42
   test(
     "select channelsId, max(channelsId+channelsId)  Total from Carbon_automation_test group by  " +
-      "channelsId order by Total"
+    "channelsId order by Total"
   )({
 
     checkAnswer(
       sql(
         "select channelsId, max(channelsId+channelsId)  Total from Carbon_automation_test group " +
-          "by  channelsId order by Total"
+        "by  channelsId order by Total"
       ),
       Seq(Row("1", 2),
         Row("2", 4),
@@ -477,13 +478,13 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //Test-43
   test(
     "select Latest_YEAR ,sum(distinct Latest_YEAR)+10 from Carbon_automation_test group by " +
-      "Latest_YEAR"
+    "Latest_YEAR"
   )({
 
     checkAnswer(
       sql(
         "select Latest_YEAR ,sum(distinct Latest_YEAR)+10 from Carbon_automation_test group by " +
-          "Latest_YEAR"
+        "Latest_YEAR"
       ),
       Seq(Row(2015, 2025))
     )
@@ -494,13 +495,13 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
 
   test(
     "select Latest_YEAR ,sum(distinct Latest_YEAR)+10 from Carbon_automation_test group by " +
-      "Latest_YEAR."
+    "Latest_YEAR."
   )({
 
     checkAnswer(
       sql(
         "select Latest_YEAR ,sum(distinct Latest_YEAR)+10 from Carbon_automation_test group by " +
-          "Latest_YEAR"
+        "Latest_YEAR"
       ),
       Seq(Row(2015, 2025))
     )
@@ -532,7 +533,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
 
     checkAnswer(
       sql("select sum(gamepointid) +10.36 as a ,series  from Carbon_automation_test group by " +
-        "series"),
+          "series"),
       Seq(Row(12932.36, "6Series"),
         Row(25890.36, "0Series"),
         Row(12354.36, "4Series"),
@@ -551,12 +552,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_055
   test(
     "select count(deviceinformationid)+10.32 as a ,series  from Carbon_automation_test group by " +
-      "series"
+    "series"
   )({
     checkAnswer(
       sql(
         "select count(deviceinformationid)+10.32 as a ,series  from Carbon_automation_test group " +
-          "by series"
+        "by series"
       ),
       Seq(Row(19.32, "6Series"),
         Row(25.32, "0Series"),
@@ -575,7 +576,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
 
   //TC_056
   test("select count(gamepointid) +10.36 as a ,series  from Carbon_automation_test group by " +
-    "series")(
+       "series")(
   {
     checkAnswer(
       sql(
@@ -622,7 +623,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   test("select count(distinct series)+10 as a,series from Carbon_automation_test group by series")({
     checkAnswer(
       sql("select count(distinct series)+10 as a,series from Carbon_automation_test group by " +
-        "series"),
+          "series"),
       Seq(Row(11, "6Series"),
         Row(11, "0Series"),
         Row(11, "4Series"),
@@ -703,12 +704,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_067
   test(
     "select count (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-      "Carbon_automation_test"
+    "Carbon_automation_test"
   )({
     checkAnswer(
       sql(
         "select count (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-          "Carbon_automation_test"
+        "Carbon_automation_test"
       ),
       Seq(Row(3))
     )
@@ -741,12 +742,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_080
   test(
     "select sum (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-      "Carbon_automation_test"
+    "Carbon_automation_test"
   )({
     checkAnswer(
       sql(
         "select sum (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-          "Carbon_automation_test"
+        "Carbon_automation_test"
       ),
       Seq(Row(111))
     )
@@ -765,12 +766,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_088
   test(
     "select avg (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-      "Carbon_automation_test"
+    "Carbon_automation_test"
   )({
     checkAnswer(
       sql(
         "select avg (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-          "Carbon_automation_test"
+        "Carbon_automation_test"
       ),
       Seq(Row(37.0))
     )
@@ -815,12 +816,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_095
   test(
     "select min (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-      "Carbon_automation_test"
+    "Carbon_automation_test"
   )({
     checkAnswer(
       sql(
         "select min (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-          "Carbon_automation_test"
+        "Carbon_automation_test"
       ),
       Seq(Row(1))
     )
@@ -865,12 +866,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_102
   test(
     "select max (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-      "Carbon_automation_test"
+    "Carbon_automation_test"
   )({
     checkAnswer(
       sql(
         "select max (if(deviceInformationId>100,NULL,deviceInformationId))  a from " +
-          "Carbon_automation_test"
+        "Carbon_automation_test"
       ),
       Seq(Row(100))
     )
@@ -914,12 +915,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
 
   //TC_108
   test("select covar_pop(deviceInformationId,deviceInformationId) as a  from " +
-    "Carbon_automation_test")(
+       "Carbon_automation_test")(
   {
     checkAnswer(
       sql(
         "select covar_pop(deviceInformationId,deviceInformationId) as a  from " +
-          "Carbon_automation_test"
+        "Carbon_automation_test"
       ),
       Seq(Row(9310415559.636362))
     )
@@ -933,7 +934,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
     checkAnswer(
       sql(
         "select covar_samp(deviceInformationId,deviceInformationId) as a  from " +
-          "Carbon_automation_test"
+        "Carbon_automation_test"
       ),
       Seq(Row(9.405419800040813E9))
     )
@@ -986,7 +987,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   test("select series,count(imei) a from Carbon_automation_test group by series order by series")({
     checkAnswer(
       sql("select series,count(imei) a from Carbon_automation_test group by series order by " +
-        "series"),
+          "series"),
       Seq(Row("0Series", 15),
         Row("1Series", 3),
         Row("2Series", 9),
@@ -1005,12 +1006,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_138
   test(
     "select series,ActiveProvince,count(imei)  a from Carbon_automation_test group by " +
-      "ActiveProvince,series order by series,ActiveProvince"
+    "ActiveProvince,series order by series,ActiveProvince"
   )({
     checkAnswer(
       sql(
         "select series,ActiveProvince,count(imei)  a from Carbon_automation_test group by " +
-          "ActiveProvince,series order by series,ActiveProvince"
+        "ActiveProvince,series order by series,ActiveProvince"
       ),
       Seq(Row("0Series", "Guangdong Province", 1),
         Row("0Series", "Hubei Province", 5),
@@ -1048,12 +1049,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_139
   test(
     "select count(distinct deviceColor) a,deliveryProvince from Carbon_automation_test group by " +
-      "deliveryProvince"
+    "deliveryProvince"
   )({
     checkAnswer(
       sql(
         "select count(distinct deviceColor) a,deliveryProvince from Carbon_automation_test group " +
-          "by deliveryProvince"
+        "by deliveryProvince"
       ),
       Seq(Row(10, "Hunan Province"), Row(10, "Guangdong Province"), Row(10, "Hubei Province"))
     )
@@ -1067,7 +1068,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
     checkAnswer(
       sql(
         "select series,sum(gamePointId) a from Carbon_automation_test group by series order by " +
-          "series"
+        "series"
       ),
       Seq(Row("0Series", 25880.0),
         Row("1Series", 4001.0),
@@ -1087,12 +1088,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_162
   test(
     "select imei,series from Carbon_automation_test where Carbon_automation_test.series IN " +
-      "('1Series','7Series')"
+    "('1Series','7Series')"
   )({
     checkAnswer(
       sql(
         "select imei,series from Carbon_automation_test where Carbon_automation_test.series IN " +
-          "('1Series','7Series')"
+        "('1Series','7Series')"
       ),
       Seq(Row("1AA1", "7Series"),
         Row("1AA10", "7Series"),
@@ -1116,12 +1117,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_163
   test(
     "select imei,series from Carbon_automation_test where Carbon_automation_test.series  NOT IN " +
-      "('1Series','7Series')"
+    "('1Series','7Series')"
   )({
     checkAnswer(
       sql(
         "select imei,series from Carbon_automation_test where Carbon_automation_test.series  NOT " +
-          "IN ('1Series','7Series')"
+        "IN ('1Series','7Series')"
       ),
       Seq(Row("1AA100", "5Series"),
         Row("1AA1000", "5Series"),
@@ -1830,12 +1831,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_180
   test(
     "select series,sum(gamePointId) a from Carbon_automation_test group by series order by series" +
-      " desc"
+    " desc"
   )({
     checkAnswer(
       sql(
         "select series,sum(gamePointId) a from Carbon_automation_test group by series order by " +
-          "series desc"
+        "series desc"
       ),
       Seq(Row("9Series", 12920.0),
         Row("8Series", 13567.0),
@@ -1859,7 +1860,7 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
     checkAnswer(
       sql(
         "select series,sum(gamePointId) a from Carbon_automation_test group by series order by a " +
-          "desc"
+        "desc"
       ),
       Seq(Row("5Series", 29071.0),
         Row("0Series", 25880.0),
@@ -1879,12 +1880,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_182
   test(
     "select series,sum(gamePointId) a from Carbon_automation_test group by series order by series" +
-      " desc ,a desc"
+    " desc ,a desc"
   )({
     checkAnswer(
       sql(
         "select series,sum(gamePointId) a from Carbon_automation_test group by series order by " +
-          "series desc ,a desc"
+        "series desc ,a desc"
       ),
       Seq(Row("9Series", 12920.0),
         Row("8Series", 13567.0),
@@ -1904,12 +1905,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_183
   test(
     "select series,sum(gamePointId) a from Carbon_automation_test group by series order by series" +
-      " asc"
+    " asc"
   )({
     checkAnswer(
       sql(
         "select series,sum(gamePointId) a from Carbon_automation_test group by series order by " +
-          "series asc"
+        "series asc"
       ),
       Seq(Row("0Series", 25880.0),
         Row("1Series", 4001.0),
@@ -1928,12 +1929,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
 
   //TC_184
   test("select series,sum(gamePointId) a from Carbon_automation_test group by series order by a " +
-    "asc")(
+       "asc")(
   {
     checkAnswer(
       sql(
         "select series,sum(gamePointId) a from Carbon_automation_test group by series order by a " +
-          "asc"
+        "asc"
       ),
       Seq(Row("1Series", 4001.0),
         Row("4Series", 12344.0),
@@ -1953,12 +1954,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_185
   test(
     "select series,sum(gamePointId) a from Carbon_automation_test group by series order by series" +
-      " asc ,a asc"
+    " asc ,a asc"
   )({
     checkAnswer(
       sql(
         "select series,sum(gamePointId) a from Carbon_automation_test group by series order by " +
-          "series asc ,a asc"
+        "series asc ,a asc"
       ),
       Seq(Row("0Series", 25880.0),
         Row("1Series", 4001.0),
@@ -1978,12 +1979,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_186
   test(
     "select series,sum(gamePointId) a from Carbon_automation_test group by series order by series" +
-      " desc ,a asc"
+    " desc ,a asc"
   )({
     checkAnswer(
       sql(
         "select series,sum(gamePointId) a from Carbon_automation_test group by series order by " +
-          "series desc ,a asc"
+        "series desc ,a asc"
       ),
       Seq(Row("9Series", 12920.0),
         Row("8Series", 13567.0),
@@ -2003,12 +2004,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_187
   test(
     "select series,ActiveProvince,sum(gamePointId) a from Carbon_automation_test group by series," +
-      "ActiveProvince order by series desc,ActiveProvince asc"
+    "ActiveProvince order by series desc,ActiveProvince asc"
   )({
     checkAnswer(
       sql(
         "select series,ActiveProvince,sum(gamePointId) a from Carbon_automation_test group by " +
-          "series,ActiveProvince order by series desc,ActiveProvince asc"
+        "series,ActiveProvince order by series desc,ActiveProvince asc"
       ),
       Seq(Row("9Series", "Guangdong Province", 2205.0),
         Row("9Series", "Hubei Province", 2530.0),
@@ -2484,12 +2485,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_216
   test(
     "select imei, Latest_DAY from Carbon_automation_test where Latest_DAY NOT BETWEEN " +
-      "Latest_areaId AND  Latest_HOUR"
+    "Latest_areaId AND  Latest_HOUR"
   )({
     checkAnswer(
       sql(
         "select imei, Latest_DAY from Carbon_automation_test where Latest_DAY NOT BETWEEN " +
-          "Latest_areaId AND  Latest_HOUR"
+        "Latest_areaId AND  Latest_HOUR"
       ),
       Seq(Row("1AA1", 1),
         Row("1AA10", 1),
@@ -2802,12 +2803,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_223
   test(
     "select * from (select if( Latest_areaId=7,7,NULL) as babu,Latest_MONTH from " +
-      "Carbon_automation_test) qq where babu LIKE   Latest_MONTH"
+    "Carbon_automation_test) qq where babu LIKE   Latest_MONTH"
   )({
     checkAnswer(
       sql(
         "select * from (select if( Latest_areaId=7,7,NULL) as babu,Latest_MONTH from " +
-          "Carbon_automation_test) qq where babu LIKE   Latest_MONTH"
+        "Carbon_automation_test) qq where babu LIKE   Latest_MONTH"
       ),
       Seq(Row(7, 7),
         Row(7, 7),
@@ -2834,14 +2835,14 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_263
   test(
     "SELECT AMSize, ActiveAreaId, SUM(gamePointId) AS Sum_gamePointId FROM (select * from " +
-      "Carbon_automation_test) SUB_QRY GROUP BY AMSize, ActiveAreaId ORDER BY AMSize ASC, " +
-      "ActiveAreaId ASC"
+    "Carbon_automation_test) SUB_QRY GROUP BY AMSize, ActiveAreaId ORDER BY AMSize ASC, " +
+    "ActiveAreaId ASC"
   )({
     checkAnswer(
       sql(
         "SELECT AMSize, ActiveAreaId, SUM(gamePointId) AS Sum_gamePointId FROM (select * from " +
-          "Carbon_automation_test) SUB_QRY GROUP BY AMSize, ActiveAreaId ORDER BY AMSize ASC, " +
-          "ActiveAreaId ASC"
+        "Carbon_automation_test) SUB_QRY GROUP BY AMSize, ActiveAreaId ORDER BY AMSize ASC, " +
+        "ActiveAreaId ASC"
       ),
       Seq(Row("0RAM size", "1", 2849.0),
         Row("0RAM size", "2", 79.0),
@@ -2900,14 +2901,14 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_265
   test(
     "SELECT AMSize, ActiveAreaId, SUM(gamePointId) AS Sum_gamePointId FROM (select * from " +
-      "Carbon_automation_test) SUB_QRY WHERE NOT(AMSize = \"\") GROUP BY AMSize, ActiveAreaId " +
-      "ORDER BY AMSize ASC, ActiveAreaId ASC"
+    "Carbon_automation_test) SUB_QRY WHERE NOT(AMSize = \"\") GROUP BY AMSize, ActiveAreaId " +
+    "ORDER BY AMSize ASC, ActiveAreaId ASC"
   )({
     checkAnswer(
       sql(
         "SELECT AMSize, ActiveAreaId, SUM(gamePointId) AS Sum_gamePointId FROM (select * from " +
-          "Carbon_automation_test) SUB_QRY WHERE NOT(AMSize = \"\") GROUP BY AMSize, ActiveAreaId" +
-          " ORDER BY AMSize ASC, ActiveAreaId ASC"
+        "Carbon_automation_test) SUB_QRY WHERE NOT(AMSize = \"\") GROUP BY AMSize, ActiveAreaId" +
+        " ORDER BY AMSize ASC, ActiveAreaId ASC"
       ),
       Seq(Row("0RAM size", "1", 2849.0),
         Row("0RAM size", "2", 79.0),
@@ -2966,12 +2967,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_274
   test(
     "SELECT ActiveCountry, ActiveDistrict, Activecity, SUM(gamepointid) AS Sum_gamepointid FROM  " +
-      "Carbon_automation_test group by ActiveCountry,ActiveDistrict,Activecity"
+    "Carbon_automation_test group by ActiveCountry,ActiveDistrict,Activecity"
   )({
     checkAnswer(
       sql(
         "SELECT ActiveCountry, ActiveDistrict, Activecity, SUM(gamepointid) AS Sum_gamepointid " +
-          "FROM  Carbon_automation_test group by ActiveCountry,ActiveDistrict,Activecity"
+        "FROM  Carbon_automation_test group by ActiveCountry,ActiveDistrict,Activecity"
       ),
       Seq(Row("Chinese", "hongshan", "wuhan", 28312.635000000002),
         Row("Chinese", "longgang", "shenzhen", 17562.0),
@@ -2988,15 +2989,15 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_275
   test(
     "SELECT Latest_country, Latest_city, Latest_district, SUM(gamepointid) AS Sum_gamepointid " +
-      "FROM (select * from Carbon_automation_test) SUB_QRY GROUP BY Latest_country, Latest_city, " +
-      "Latest_district ORDER BY Latest_country ASC, Latest_city ASC, Latest_district ASC"
+    "FROM (select * from Carbon_automation_test) SUB_QRY GROUP BY Latest_country, Latest_city, " +
+    "Latest_district ORDER BY Latest_country ASC, Latest_city ASC, Latest_district ASC"
   )({
     checkAnswer(
       sql(
         "SELECT Latest_country, Latest_city, Latest_district, SUM(gamepointid) AS Sum_gamepointid" +
-          " FROM (select * from Carbon_automation_test) SUB_QRY GROUP BY Latest_country, " +
-          "Latest_city, Latest_district ORDER BY Latest_country ASC, Latest_city ASC, " +
-          "Latest_district ASC"
+        " FROM (select * from Carbon_automation_test) SUB_QRY GROUP BY Latest_country, " +
+        "Latest_city, Latest_district ORDER BY Latest_country ASC, Latest_city ASC, " +
+        "Latest_district ASC"
       ),
       Seq(Row("Chinese", "changsha", "yuhua", 26119.0),
         Row("Chinese", "guangzhou", "longhua", 31520.561999999998),
@@ -3013,14 +3014,14 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_276
   test(
     "SELECT Activecity, ActiveCountry, ActiveDistrict, COUNT(imei) AS Count_imei FROM (select * " +
-      "from Carbon_automation_test) SUB_QRY GROUP BY Activecity, ActiveCountry, ActiveDistrict " +
-      "ORDER BY Activecity ASC, ActiveCountry ASC, ActiveDistrict ASC"
+    "from Carbon_automation_test) SUB_QRY GROUP BY Activecity, ActiveCountry, ActiveDistrict " +
+    "ORDER BY Activecity ASC, ActiveCountry ASC, ActiveDistrict ASC"
   )({
     checkAnswer(
       sql(
         "SELECT Activecity, ActiveCountry, ActiveDistrict, COUNT(imei) AS Count_imei FROM (select" +
-          " * from Carbon_automation_test) SUB_QRY GROUP BY Activecity, ActiveCountry, " +
-          "ActiveDistrict ORDER BY Activecity ASC, ActiveCountry ASC, ActiveDistrict ASC"
+        " * from Carbon_automation_test) SUB_QRY GROUP BY Activecity, ActiveCountry, " +
+        "ActiveDistrict ORDER BY Activecity ASC, ActiveCountry ASC, ActiveDistrict ASC"
       ),
       Seq(Row("changsha", "Chinese", "yuhua", 19),
         Row("guangzhou", "Chinese", "longhua", 8),
@@ -3037,12 +3038,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_279
   test(
     "SELECT ActiveCountry, COUNT(DISTINCT imei) AS DistinctCount_imei FROM (select * from " +
-      "Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry ORDER BY ActiveCountry ASC"
+    "Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry ORDER BY ActiveCountry ASC"
   )({
     checkAnswer(
       sql(
         "SELECT ActiveCountry, COUNT(DISTINCT imei) AS DistinctCount_imei FROM (select * from " +
-          "Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry ORDER BY ActiveCountry ASC"
+        "Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry ORDER BY ActiveCountry ASC"
       ),
       Seq(Row("Chinese", 99))
     )
@@ -3052,15 +3053,15 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_282
   test(
     "SELECT ActiveCountry, ActiveDistrict, Activecity, SUM(gamepointid) AS Sum_gamepointid FROM " +
-      "(select * from Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry, ActiveDistrict, " +
-      "Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, Activecity ASC"
+    "(select * from Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry, ActiveDistrict, " +
+    "Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, Activecity ASC"
   )({
     checkAnswer(
       sql(
         "SELECT ActiveCountry, ActiveDistrict, Activecity, SUM(gamepointid) AS Sum_gamepointid " +
-          "FROM (select * from Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry, " +
-          "ActiveDistrict, Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, Activecity " +
-          "ASC"
+        "FROM (select * from Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry, " +
+        "ActiveDistrict, Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, Activecity " +
+        "ASC"
       ),
       Seq(Row("Chinese", "hongshan", "wuhan", 28312.635000000002),
         Row("Chinese", "longgang", "shenzhen", 17562.0),
@@ -3185,12 +3186,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_318
   test(
     "select count(series),series from Carbon_automation_test group by series having " +
-      "series='6Series'"
+    "series='6Series'"
   )({
     checkAnswer(
       sql(
         "select count(series),series from Carbon_automation_test group by series having " +
-          "series='6Series'"
+        "series='6Series'"
       ),
       Seq(Row(9, "6Series"))
     )
@@ -3200,15 +3201,15 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_319
   test(
     "SELECT ActiveCountry, ActiveDistrict, Activecity, SUM(gamePointId) AS Sum_gamePointId FROM " +
-      "(select * from Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry, ActiveDistrict, " +
-      "Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, Activecity ASC"
+    "(select * from Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry, ActiveDistrict, " +
+    "Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, Activecity ASC"
   )({
     checkAnswer(
       sql(
         "SELECT ActiveCountry, ActiveDistrict, Activecity, SUM(gamePointId) AS Sum_gamePointId " +
-          "FROM (select * from Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry, " +
-          "ActiveDistrict, Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, Activecity " +
-          "ASC"
+        "FROM (select * from Carbon_automation_test) SUB_QRY GROUP BY ActiveCountry, " +
+        "ActiveDistrict, Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, Activecity " +
+        "ASC"
       ),
       Seq(Row("Chinese", "hongshan", "wuhan", 28312.635000000002),
         Row("Chinese", "longgang", "shenzhen", 17562.0),
@@ -3225,16 +3226,16 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_321
   test(
     "SELECT ActiveCountry, ActiveDistrict, Activecity, SUM(gamePointId) AS Sum_gamePointId FROM " +
-      "(select * from Carbon_automation_test) SUB_QRY WHERE imei = \"1AA100000\" GROUP BY " +
-      "ActiveCountry, ActiveDistrict, Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, " +
-      "Activecity ASC"
+    "(select * from Carbon_automation_test) SUB_QRY WHERE imei = \"1AA100000\" GROUP BY " +
+    "ActiveCountry, ActiveDistrict, Activecity ORDER BY ActiveCountry ASC, ActiveDistrict ASC, " +
+    "Activecity ASC"
   )({
     checkAnswer(
       sql(
         "SELECT ActiveCountry, ActiveDistrict, Activecity, SUM(gamePointId) AS Sum_gamePointId " +
-          "FROM (select * from Carbon_automation_test) SUB_QRY WHERE imei = \"1AA100000\" GROUP " +
-          "BY ActiveCountry, ActiveDistrict, Activecity ORDER BY ActiveCountry ASC, " +
-          "ActiveDistrict ASC, Activecity ASC"
+        "FROM (select * from Carbon_automation_test) SUB_QRY WHERE imei = \"1AA100000\" GROUP " +
+        "BY ActiveCountry, ActiveDistrict, Activecity ORDER BY ActiveCountry ASC, " +
+        "ActiveDistrict ASC, Activecity ASC"
       ),
       Seq(Row("Chinese", "yichang", "yichang", 136.0))
     )
@@ -3244,12 +3245,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_384
   test(
     "SELECT series, SUM(gamePointId) AS Sum_gamePointId FROM (select * from " +
-      "Carbon_automation_test) SUB_QRY GROUP BY series ORDER BY series ASC"
+    "Carbon_automation_test) SUB_QRY GROUP BY series ORDER BY series ASC"
   )({
     checkAnswer(
       sql(
         "SELECT series, SUM(gamePointId) AS Sum_gamePointId FROM (select * from " +
-          "Carbon_automation_test) SUB_QRY GROUP BY series ORDER BY series ASC"
+        "Carbon_automation_test) SUB_QRY GROUP BY series ORDER BY series ASC"
       ),
       Seq(Row("0Series", 25880.0),
         Row("1Series", 4001.0),
@@ -3269,12 +3270,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_386
   test(
     "SELECT channelsId, deliveryCity FROM (select * from Carbon_automation_test) SUB_QRY GROUP BY" +
-      " channelsId, deliveryCity ORDER BY channelsId ASC, deliveryCity ASC"
+    " channelsId, deliveryCity ORDER BY channelsId ASC, deliveryCity ASC"
   )({
     checkAnswer(
       sql(
         "SELECT channelsId, deliveryCity FROM (select * from Carbon_automation_test) SUB_QRY " +
-          "GROUP BY channelsId, deliveryCity ORDER BY channelsId ASC, deliveryCity ASC"
+        "GROUP BY channelsId, deliveryCity ORDER BY channelsId ASC, deliveryCity ASC"
       ),
       Seq(Row("1", "changsha"),
         Row("1", "guangzhou"),
@@ -3329,12 +3330,12 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_387
   test(
     "SELECT modelId, SUM(gamepointid) AS Sum_gamepointid FROM (select * from " +
-      "Carbon_automation_test) SUB_QRY GROUP BY modelId ORDER BY modelId ASC"
+    "Carbon_automation_test) SUB_QRY GROUP BY modelId ORDER BY modelId ASC"
   )({
     checkAnswer(
       sql(
         "SELECT modelId, SUM(gamepointid) AS Sum_gamepointid FROM (select * from " +
-          "Carbon_automation_test) SUB_QRY GROUP BY modelId ORDER BY modelId ASC"
+        "Carbon_automation_test) SUB_QRY GROUP BY modelId ORDER BY modelId ASC"
       ),
       Seq(Row("1017", 2483.0),
         Row("104", 1442.0),
@@ -3443,13 +3444,13 @@ class AllDataTypesTestCase1 extends QueryTest with BeforeAndAfterAll {
   //TC_388
   test(
     "SELECT imei, channelsId, COUNT(deliveryTime) AS Count_deliveryTime FROM (select * from " +
-      "Carbon_automation_test) SUB_QRY GROUP BY imei, channelsId ORDER BY imei ASC, channelsId ASC"
+    "Carbon_automation_test) SUB_QRY GROUP BY imei, channelsId ORDER BY imei ASC, channelsId ASC"
   )({
     checkAnswer(
       sql(
         "SELECT imei, channelsId, COUNT(deliveryTime) AS Count_deliveryTime FROM (select * from " +
-          "Carbon_automation_test) SUB_QRY GROUP BY imei, channelsId ORDER BY imei ASC, " +
-          "channelsId ASC"
+        "Carbon_automation_test) SUB_QRY GROUP BY imei, channelsId ORDER BY imei ASC, " +
+        "channelsId ASC"
       ),
       Seq(Row("1AA1", "4", 1),
         Row("1AA10", "4", 1),