[ https://issues.apache.org/jira/browse/CARBONDATA-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chetan Bhat updated CARBONDATA-1808: ------------------------------------ Description: 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 output should be consistent for char and varchar types for similar syntax usage. was: 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. > 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 > Labels: Functional > > 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 output should be consistent for char and varchar types for similar syntax usage. -- This message was sent by Atlassian JIRA (v6.4.14#64029) |
Free forum by Nabble | Edit this page |