[CARBONDATA-4208] Wrong Exception received for complex child long string columns
authorMahesh Raju Somalaraju <mahesh.somalaraju@huawei.com>
Fri, 11 Jun 2021 19:47:27 +0000 (01:17 +0530)
committerakashrn5 <akashnilugal@gmail.com>
Fri, 18 Jun 2021 06:56:52 +0000 (12:26 +0530)
commit65fad9887425a8525a5e61d9c4ed67e3c2e39f84
tree6c6f9ac8e21a0d9a9daae45b5526d6440920abfe
parentf1da9e8c155297ea22808e5b01137cd84e9561d9
[CARBONDATA-4208] Wrong Exception received for complex child long string columns

Why is this PR needed?
When we create a table with complex columns with child columns with long string
data type then receiving column not found in table exception. Normally it should
throw an exception in the above case by saying that complex child columns will
not support long string data type.

What changes were proposed in this PR?
Added a case if complex child column has long string data type then throw correct
exception.
Exception: MalformedCarbonCommandException
Exception Message: Complex child column cannot be set as LONG_STRING_COLUMNS

Does this PR introduce any user interface change?
No

Is any new testcase added?
Yes

This closes #4150
core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/ColumnSchema.java
core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
integration/spark/src/main/scala/org/apache/spark/sql/catalyst/CarbonParserUtil.scala
integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/complexType/TestComplexDataType.scala