Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1785#discussion_r161144435
--- Diff:
integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/TestLoadDataGeneral.scala
---
@@ -187,6 +187,75 @@ class TestLoadDataGeneral extends QueryTest with
BeforeAndAfterAll {
} catch {
case _:Exception => assert(true)
}
+ }
+
+ test("test load / insert / update with data more than 32000 bytes -
dictionary_exclude") {
+ val testdata = s"$resourcesPath/unicodechar.csv"
+ sql("drop table if exists load32000bytes")
+ sql("create table load32000bytes(name string) stored by 'carbondata'")
+ sql("insert into table load32000bytes select 'aaa'")
+
+ assert(intercept[Exception] {
+ sql(s"load data local inpath '$testdata' into table load32000bytes
OPTIONS ('FILEHEADER'='name')")
+ }.getMessage.equals("DataLoad failure: Dataload failed, String size
cannot exceed 32000 bytes"))
+
+ val source = scala.io.Source.fromFile(testdata)
+ val data = source.mkString
+
+ try {
+ sql(s"insert into load32000bytes values('$data')")
--- End diff --
avoid using try catch and use intercept[Exception]
---