carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvramana <...@git.apache.org>
Subject [GitHub] carbondata pull request #1011: [carbondata-1149] Fix issue of mismatch type ...
Date Mon, 12 Jun 2017 05:48:38 GMT
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1011#discussion_r121312645
  
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestDDLForPartitionTable.scala
---
    @@ -122,6 +122,254 @@ class TestDDLForPartitionTable  extends QueryTest with BeforeAndAfterAll
{
         intercept[Exception] { sql("alter table test drop columns(c)") }
       }
     
    +  test("test exception if hash number is invalid") {
    +    sql("DROP TABLE IF EXISTS test_hash_1")
    +    try {
    +      sql(
    +        """
    +          | CREATE TABLE test_hash_1(col1 INT, col2 STRING)
    +          | PARTITIONED BY (col3 INT) STORED BY 'carbondata'
    +          | TBLPROPERTIES('PARTITION_TYPE'='HASH', 'NUM_PARTITIONS'='2.1')
    +        """.stripMargin
    +      )
    +    } catch {
    +      case e: Exception =>
    +        assert(e.getMessage.contains("Invalid partition definition"))
    +    }
    +
    +    sql("DROP TABLE IF EXISTS test_hash_2")
    --- End diff --
    
    One test for failure validation is sufficient. As all of them are covered in parse exception


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message