Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2923#discussion_r235681603
  
    --- Diff: 
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/standardpartition/StandardPartitionTableQueryTestCase.scala
 ---
    @@ -437,6 +437,20 @@ test("Creation of partition table should fail if the 
colname in table schema and
         sql("drop datamap if exists preaggTable on table partitionTable")
       }
     
    +  test("validate data in partition table after dropping and adding a 
column") {
    +    sql("drop table if exists par")
    +    sql("create table par(name string) partitioned by (age double) stored 
by " +
    +              "'carbondata'")
    +    sql(s"load data local inpath '$resourcesPath/uniqwithoutheader.csv' 
into table par options" +
    +        s"('header'='false')")
    +    sql("alter table par drop columns(name)")
    +    sql("alter table par add columns(name string)")
    +    sql(s"load data local inpath '$resourcesPath/uniqwithoutheader.csv' 
into table par options" +
    +        s"('header'='false')")
    --- End diff --
    
    @ravipesala Spark-2.1 and 2.2 both put partition column at the last even if 
a new column is added.


---

Reply via email to