[ https://issues.apache.org/jira/browse/CARBONDATA-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15600907#comment-15600907 ] Harmeet Singh commented on CARBONDATA-332: ------------------------------------------ Hello zhangshunyu, Yes, I agree with you, carbon data not supported all behavior of hive, but this is not a recommended and good approach for using system reserver words in creating data structures like database, tables or columns. > Create successfully Database, tables and columns using carbon reserve keywords > ------------------------------------------------------------------------------ > > Key: CARBONDATA-332 > URL: https://issues.apache.org/jira/browse/CARBONDATA-332 > Project: CarbonData > Issue Type: Bug > Reporter: Harmeet Singh > > Hey team, I am trying to create database, tables and columns with carbon reserve keywords name and carbon allow us for creating. I am expecting an error. In hive, we are facing an error. Following are the steps : > Step1: > 0: jdbc:hive2://127.0.0.1:10000> create database double; > +---------+--+ > | result | > +---------+--+ > +---------+--+ > No rows selected (6.225 seconds) > Step 2: > 0: jdbc:hive2://127.0.0.1:10000> use double; > +---------+--+ > | result | > +---------+--+ > +---------+--+ > No rows selected (0.104 seconds) > Step 3: > 0: jdbc:hive2://127.0.0.1:10000> create table decimal(int int, string string) stored by 'carbondata'; > +---------+--+ > | Result | > +---------+--+ > +---------+--+ > No rows selected (2.372 seconds) > Step 4: > 0: jdbc:hive2://127.0.0.1:10000> show tables; > +------------+--------------+--+ > | tableName | isTemporary | > +------------+--------------+--+ > | decimal | false | > +------------+--------------+--+ > 1 row selected (0.071 seconds) > Step 5: > 0: jdbc:hive2://127.0.0.1:10000> desc decimal; > +-----------+------------+----------+--+ > | col_name | data_type | comment | > +-----------+------------+----------+--+ > | string | string | | > | int | bigint | | > +-----------+------------+----------+--+ > 2 rows selected (0.556 seconds) > Step 6: > 0: jdbc:hive2://127.0.0.1:10000> load data inpath 'hdfs://localhost:54310/home/harmeet/reservewords.csv' into table decimal; > +---------+--+ > | Result | > +---------+--+ > +---------+--+ > No rows selected (0.863 seconds) > Step 7: > 0: jdbc:hive2://127.0.0.1:10000> select * from decimal; > +---------+------+--+ > | string | int | > +---------+------+--+ > | james | 10 | > +---------+------+--+ > 1 row selected (0.413 seconds) -- This message was sent by Atlassian JIRA (v6.3.4#6332) |
Free forum by Nabble | Edit this page |