[jira] [Commented] (CARBONDATA-598) Not using tableName option in Create table command Shows Strange Behaviour

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CARBONDATA-598) Not using tableName option in Create table command Shows Strange Behaviour

Akash R Nilugal (Jira)

    [ https://issues.apache.org/jira/browse/CARBONDATA-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15831306#comment-15831306 ]

Naresh P R commented on CARBONDATA-598:
---------------------------------------

I have analyzed this issue and found DatasourceAPI CarbonSource createRelation is getting called from SchemaRelationProvider with options map and schema information only. CarbonSource will not get table identifier provided in create table using datasource command.

Hence its always required to pass tableName, dbName in options same as table identifier while creating table using datasource.

Alternatively, we can use SQL statements to create carbon table, please refer below link for the same.
https://github.com/apache/incubator-carbondata/blob/master/docs/ddl-operation-on-carbondata.md#create-table

> Not using tableName option in Create table command Shows Strange Behaviour
> ---------------------------------------------------------------------------
>
>                 Key: CARBONDATA-598
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-598
>             Project: CarbonData
>          Issue Type: Bug
>          Components: spark-integration
>    Affects Versions: 1.0.0-incubating
>         Environment: spark 2.1
>            Reporter: anubhav tarar
>            Assignee: Naresh P R
>
> if you dont use the tableName Option when creating table with Bucketing it shows strange behaviour and do not validate any check
> here are the logs
> spark.sql("""CREATE TABLE t3qqqq219(ID Int)USING org.apache.spark.sql.CarbonSource OPTIONS("bucketnumber"="1","bucketcolumns"="id","tableName"="t3q21000")""");
> here file t3q21000 get created in hdfs
> which should not be created it is quite confusing
> either there should be a check that both table name in create table statement and  tableName in Option both are same and if it is allowed it should valid all the checks  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)