carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Bhat (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CARBONDATA-1808) Inconsistency in create table and alter table usage for char and varchar column
Date Fri, 24 Nov 2017 15:44:00 GMT
Chetan Bhat created CARBONDATA-1808:
---------------------------------------

             Summary: Inconsistency in create table and alter table usage for char and varchar
column
                 Key: CARBONDATA-1808
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1808
             Project: CarbonData
          Issue Type: Bug
          Components: sql
    Affects Versions: 1.3.0
         Environment: 3 node ant cluster
            Reporter: Chetan Bhat
            Priority: Minor


Steps:
User creates a table with char datatype --> Create table is success.
0: jdbc:hive2://10.18.98.34:23040> CREATE TABLE sensor_reading_blockblank_false(id char)
 STORED BY 'carbondata';
+---------+--+
| Result  |
+---------+--+
+---------+--+
No rows selected (0.688 seconds)
User tries to alter the table using column name for char datatype in the same way.
alter table sensor_reading_blockblank_false add columns(id1 char);

Issue : Alter table fails with parsing error as shown below
0: jdbc:hive2://10.18.98.34:23040> alter table sensor_reading_blockblank_false add columns(id1
char);
Error: java.lang.RuntimeException:
BaseSqlParser>>>>
Operation not allowed: alter table add columns(line 1, pos 0)

== SQL ==
alter table sensor_reading_blockblank_false add columns(id1 char)
^^^

CarbonSqlParser>>>> [1.65] failure: ``('' expected but `)' found

alter table sensor_reading_blockblank_false add columns(id1 char)
                                                                ^ (state=,code=0)

Similar consistency issue is observed for varchar data type create table and alter table usage.

0: jdbc:hive2://10.18.98.34:23040> CREATE TABLE sensor_reading_blockblank_false(id varchar)
 STORED BY 'carbondata';
+---------+--+
| Result  |
+---------+--+
+---------+--+
No rows selected (0.244 seconds)
0: jdbc:hive2://10.18.98.34:23040> alter table sensor_reading_blockblank_false add columns(id1
varchar);
Error: java.lang.RuntimeException:
BaseSqlParser>>>>
Operation not allowed: alter table add columns(line 1, pos 0)

== SQL ==
alter table sensor_reading_blockblank_false add columns(id1 varchar)
^^^

CarbonSqlParser>>>> [1.68] failure: ``('' expected but `)' found

alter table sensor_reading_blockblank_false add columns(id1 varchar)
                                                                   ^ (state=,code=0)


Expected : The create table and alter table should be consistent for char and varchar types
for similar syntax usage.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message