[ 
https://issues.apache.org/jira/browse/CARBONDATA-586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ravindra Pesala resolved CARBONDATA-586.
----------------------------------------
    Resolution: Won't Fix

> Create table with 'Char' data type but it workes as 'String' data type
> ----------------------------------------------------------------------
>
>                 Key: CARBONDATA-586
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-586
>             Project: CarbonData
>          Issue Type: Improvement
>          Components: data-load
>    Affects Versions: 1.0.0-incubating
>         Environment: spark 1.6.2
> spark 2.1
>            Reporter: Anurag Srivastava
>            Assignee: QiangCai
>            Priority: Minor
>
> I am trying to use Char data type with Carbon Data latest version and it 
> created successfully. When I started loading data in this that time I found 
> that it is taking data more then its size. 
> I have checked it with hive and there it is working fine.
> EX :- 
> 1. *Carbon Data :* 
> 1.1 create table test_carbon (name char(10)) stored by 
> 'org.apache.carbondata.format';
> 1.2 desc test_carbon;
> *Output :* 
> +-------------+--------------+----------+--+
> | col_name | data_type  | comment   |
> +-------------+--------------+--------------+
> | name        | string         |                  |
> +-------------+--------------+--------------+
> 1.3 LOAD DATA INPATH 'hdfs://localhost:54310/test.csv' into table test_carbon 
> OPTIONS ('FILEHEADER'='name');
> 1.4 select * from test_carbon;
> *Output :* 
> +------------------------+
> |        name               |
> +------------------------+
> | Anurag Srivasrata  |
> | Robert                    |
> | james james           |
> +------------------------+
> 2. *Hive :* 
> 2.1 create table test_hive (name char(10));
> 2.2 desc test_hive;
> *Output :* 
> +-------------+--------------+-------------+
> | col_name | data_type  | comment  |
> +-------------+--------------+-------------+
> | name        | char(10)    | NULL       |
> +-------------+--------------+-------------+
> 2.3 LOAD DATA INPATH 'hdfs://localhost:54310/test.csv' into table test_hive;
> 2.4 select * from test_hive;
> *Output :* 
> +----------------+
> |    name         |
> +----------------+
> | james jame   |
> | Anurag Sri    |
> | Robert          |
> +----------------+
> So as hive truncate remaining string with Char data type in carbon data it 
> should work like hive.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to