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

    https://github.com/apache/carbondata/pull/1452#discussion_r147938347
  
    --- Diff: 
integration/spark2/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestAlterPartitionTable.scala
 ---
    @@ -779,6 +779,25 @@ class TestAlterPartitionTable extends QueryTest with 
BeforeAndAfterAll {
              .contains("Data in range info must be the same type with the 
partition field's type"))
       }
     
    +  test("Add partition to table in or not in default database") {
    +    sql("DROP TABLE IF EXISTS carbon_table_default_db")
    +    sql(
    +      """
    +        | CREATE TABLE carbon_table_default_db(id INT, name STRING) 
PARTITIONED BY (dt STRING)
    +        | STORED BY 'carbondata' TBLPROPERTIES('PARTITION_TYPE'='RANGE', 
'RANGE_INFO'='2015,2016')
    +      """.stripMargin)
    +    sql("ALTER TABLE carbon_table_default_db ADD PARTITION ('2017')")
    --- End diff --
    
    Both are positive test cases. Please add a negative test case, where the 
table doesn't exist in a perticular database but the table is present in 
current in-use database. 
    For e.g.
    use default;
    create table table1;
    alter table carbondb.table1;
    This should fail. 
    
    Rest looks good to me. 
    



---

Reply via email to