You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2019/01/22 10:35:43 UTC

[GitHub] ajantha-bhat commented on a change in pull request #3094: [CARBONDATA-3264] Added SORT_SCOPE in ALTER TABLE SET

ajantha-bhat commented on a change in pull request #3094: [CARBONDATA-3264] Added SORT_SCOPE in ALTER TABLE SET
URL: https://github.com/apache/carbondata/pull/3094#discussion_r249723994
 
 

 ##########
 File path: integration/spark-common-cluster-test/src/test/scala/org/apache/carbondata/cluster/sdv/generated/AlterTableTestCase.scala
 ##########
 @@ -1016,6 +1016,62 @@ class AlterTableTestCase extends QueryTest with BeforeAndAfterAll {
     }
   }
 
+
+  test("AlterTable Change Sort Scope 1") {
+    sql("DROP TABLE IF EXISTS t1")
+    sql(s"CREATE TABLE t1(age int, name string) STORED BY 'carbondata' TBLPROPERTIES" +
+        s"('sort_scope'='local_sort', 'sort_columns'='age')")
+    sql("ALTER TABLE t1 SET TBLPROPERTIES('sort_scope'='batch_sort')")
+
+    var sort_scope: String = ""
+    sql("DESCRIBE FORMATTED t1").collect().foreach(row => {
+      if (row.getAs[String]("col_name").equalsIgnoreCase("sort scope")) {
+        sort_scope = row.getAs[String]("data_type")
 
 Review comment:
   After finding sort_scope no need to continue loop.
   
   I suggest better to use checkAnswer API.
   
   checkExistence(sql("describe formatted t1"), true, "Sort Scope BATCH_SORT")

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services