Login  Register

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #4019: [CARBONDATA-4053] Fix alter table rename column failed when column name is "a"

Posted by GitBox on Nov 24, 2020; 3:16am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-jack86596-opened-a-new-pull-request-4019-CARBONDATA-4053-Fix-alter-table-rename-co-tp103472p103474.html


ajantha-bhat commented on a change in pull request #4019:
URL: https://github.com/apache/carbondata/pull/4019#discussion_r529174796



##########
File path: integration/spark/src/test/scala/org/apache/spark/carbondata/restructure/vectorreader/AlterTableColumnRenameTestCase.scala
##########
@@ -38,6 +38,15 @@ class AlterTableColumnRenameTestCase extends QueryTest with BeforeAndAfterAll {
     assert(null == carbonTable.getColumnByName("empname"))
   }
 
+  test("CARBONDATA-4053 test rename column when column name is a") {
+    sql("create table simple_table(a int) stored as carbondata")
+    sql("alter table simple_table change a a1 int")
+    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default", "simple_table")

Review comment:
       This issue happens when you have table properties say SORT_COLUMNS = "a,b"
   Then the column name changed from a to a1, then it was changing SORT_COLUMNS = "a1" instead of SORT_COLUMNS = "a1,b". So, your current testcase cannot reproduce issue. so, add the testcase that gives issue without the change by keeping some table properties.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[hidden email]