carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anubhav tarar (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CARBONDATA-1096) wrong data show in quering carbontable with timestamp data type from hive
Date Mon, 29 May 2017 05:27:04 GMT

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

anubhav tarar updated CARBONDATA-1096:
--------------------------------------
    Priority: Trivial  (was: Major)

> wrong data show in quering carbontable with timestamp data type from hive 
> --------------------------------------------------------------------------
>
>                 Key: CARBONDATA-1096
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1096
>             Project: CarbonData
>          Issue Type: Bug
>          Components: hive-integration
>    Affects Versions: 1.2.0
>            Reporter: anubhav tarar
>            Assignee: anubhav tarar
>            Priority: Trivial
>
> start beeline
>  1.CREATE TABLE ALLDATATYPETEST(ID INT,NAME STRING,SALARY DECIMAL,MARKS DOUBLE,JOININGDATE
DATE,LEAVINGDATE TIMESTAMP) STORED BY 'CARBONDATA' ;
> 2. jdbc:hive2://localhost:10000> LOAD DATA INPATH 'hdfs://localhost:54310/alldatatypetest.csv'
into table alldatatypetest;
> +---------+--+
> | Result  |
> +---------+--+
> +---------+--+
> No rows selected (8.867 seconds)
> 3: jdbc:hive2://localhost:10000> select * from alldatatypetest;
> +-----+------------+---------+--------+--------------+------------------------+--+
> | id  |    name    | salary  | marks  | joiningdate  |      leavingdate       |
> +-----+------------+---------+--------+--------------+------------------------+--+
> | 1   | 'ANUBHAV'  | 200000  | 100.0  | 2016-04-14   | 2016-04-14 15:00:09.0  |
> | 2   | 'LIANG'    | 200000  | 100.0  | 2016-04-14   | 2016-04-14 15:00:09.0  |
> started the hive shell
> 4.hive> CREATE TABLE ALLDATATYPETEST(ID INT,NAME STRING,SALARY DECIMAL,MARKS DOUBLE,JOININGDATE
DATE,LEAVINGDATE TIMESTAMP) ROW FORMAT SERDE 'org.apache.carbondata.hive.CarbonHiveSerDe'
STORED AS INPUTFORMAT 'org.apache.carbondata.hive.MapredCarbonInputFormat' OUTPUTFORMAT 'org.apache.carbondata.hive.MapredCarbonOutputFormat'
TBLPROPERTIES ('spark.sql.sources.provider'='org.apache.spark.sql.CarbonSource');
> OK
> 5.hive> ALTER TABLE ALLDATATYPETEST SET LOCATION 'hdfs://localhost:54310/opt/carbonStore/default/alldatatypetest';
> OK
> Time taken: 0.208 seconds
> 6.hive> SELECT * FROM ALLDATATYPETEST;
> OK
> 1	'ANUBHAV'	200000	100.0	1970-01-01	48255-05-28 04:00:000.0
> 2	'LIANG'	200000	100.0	1970-01-01	48255-05-28 04:00:000.0
> Time taken: 0.137 seconds, Fetched: 2 row(s)



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

Mime
View raw message