[
https://issues.apache.org/jira/browse/CARBONDATA-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
anubhav tarar reassigned CARBONDATA-1548:
-----------------------------------------
Assignee: anubhav tarar
> The table should not exists when create table fail
> --------------------------------------------------
>
> Key: CARBONDATA-1548
> URL:
https://issues.apache.org/jira/browse/CARBONDATA-1548> Project: CarbonData
> Issue Type: Bug
> Reporter: xubo245
> Assignee: anubhav tarar
> Attachments: 2.PNG
>
>
> when create table with space in tableName and fail, the table with space has been create in directory, but it should be delete when create table fail!
> {code:java}
> test("test create table with space in tableName") {
> sql("drop table if exists carbon_test")
> val exception = intercept[RuntimeException] {
> sql(
> s"""
> | CREATE TABLE carbon_test(
> | stringField string,
> | intField int)
> | USING org.apache.spark.sql.CarbonSource
> | OPTIONS('DICTIONARY_EXCLUDE'='stringField', 'tableName'='carbon test')
> """.
> stripMargin
> )
> }.getMessage
> sql("drop table if exists carbon_test")
> assert(exception.eq("Table creation failed. Table name cannot contain blank space"))
> }
> {code}
> Code: org.apache.spark.carbondata.CarbonDataSourceSuite
> Attachment is result
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)