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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

GitBox
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_r249725958
 
 

 ##########
 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:
   same comment for all the new test cases

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services