[ https://issues.apache.org/jira/browse/CARBONDATA-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xubo245 updated CARBONDATA-1548: -------------------------------- Description: 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 result please look was: 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} > table should be delete when create table fail > --------------------------------------------- > > Key: CARBONDATA-1548 > URL: https://issues.apache.org/jira/browse/CARBONDATA-1548 > Project: CarbonData > Issue Type: Bug > Reporter: xubo245 > 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 > result please look -- This message was sent by Atlassian JIRA (v6.4.14#64029) |
Free forum by Nabble | Edit this page |