You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "anubhav tarar (JIRA)" <ji...@apache.org> on 2018/03/06 06:38:00 UTC
[jira] [Created] (CARBONDATA-2228) Exception is Masked Inside
StandardPartitionTableQueryTestCase
anubhav tarar created CARBONDATA-2228:
-----------------------------------------
Summary: Exception is Masked Inside StandardPartitionTableQueryTestCase
Key: CARBONDATA-2228
URL: https://issues.apache.org/jira/browse/CARBONDATA-2228
Project: CarbonData
Issue Type: Improvement
Components: test
Affects Versions: 1.4.0
Reporter: anubhav tarar
Assignee: anubhav tarar
Inside This test case exception from both spark version is different and it is masked
test("Creation of partition table should fail if the colname in table schema and partition column is same even if both are case sensitive"){
intercept[Exception]{
sql("CREATE TABLE uniqdata_char2(name char,id int) partitioned by (NAME char)stored by 'carbondata' ")
}
}
for spark 2.1 exception message is
Operation not allowed: Partition columns should not be specified in the schema: name")
but for spark 2.2 it is
DataType char is not supported"
reason for different exception in different spark version is
spark 2.1.0 supports creating table even if char data type is given with out digits
scala> spark.sql("create table id(id char)");
18/02/23 14:12:23 WARN HiveMetaStore: Location: file:/home/anubhav/Documents/phatak/spark-2.1/bin/spark-warehouse/id specified for non-external table:id
res0: org.apache.spark.sql.DataFrame = []
but not in spark 2.2.1
scala> spark.sql("create table id(id char)");
18/02/23 14:22:05 WARN ObjectStore: Failed to get database global_temp, returning NoSuchObjectException
org.apache.spark.sql.catalyst.parser.ParseException:
DataType char is not supported.(line 1, pos 19)
Solution: assert the different exception for different spark version when char data type does not have digit
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)