Github user kunal642 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1011#discussion_r121313761
--- 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(
--- End diff --
the test cases would pass if the query does not throw an exception.
use intercept instead of try the above condition would be met automatically.
val exception: Exception = intercept[Exception] {sql(..)}
assert(exception.getMessage.equals(..))
---
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 [email protected] or file a JIRA ticket
with INFRA.
---