You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by "Harmeet Singh (JIRA)" <ji...@apache.org> on 2016/10/20 10:36:58 UTC

[jira] [Created] (CARBONDATA-332) Create successfully Database, tables and columns using carbon reserve keywords

Harmeet Singh created CARBONDATA-332:
----------------------------------------

             Summary: 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)

回复:[jira] [Created] (CARBONDATA-332) Create successfully Database,tables and columns using carbon reserve keywords

Posted by 杰 <25...@qq.com>.
hi, Harmeet
  
  i will raise a pr to solve this.


thanks
Jay




------------------ 原始邮件 ------------------
发件人: "Harmeet Singh (JIRA)";<ji...@apache.org>;
发送时间: 2016年10月20日(星期四) 晚上6:36
收件人: "dev"<de...@carbondata.incubator.apache.org>; 

主题: [jira] [Created] (CARBONDATA-332) Create successfully Database,tables and columns using carbon reserve keywords



Harmeet Singh created CARBONDATA-332:
----------------------------------------

             Summary: 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)

回复:[jira] [Created] (CARBONDATA-332) Create successfully Database,tables and columns using carbon reserve keywords

Posted by 杰 <25...@qq.com>.
hi, guys


   for the reserve words, i think it maybe better to support, cause it harms nothing.
   but i am not sure. hope  u can give suggestions.
  
Thanks
Jay




------------------ 原始邮件 ------------------
发件人: "Harmeet Singh (JIRA)";<ji...@apache.org>;
发送时间: 2016年10月20日(星期四) 晚上6:36
收件人: "dev"<de...@carbondata.incubator.apache.org>; 

主题: [jira] [Created] (CARBONDATA-332) Create successfully Database,tables and columns using carbon reserve keywords



Harmeet Singh created CARBONDATA-332:
----------------------------------------

             Summary: 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)