[
https://issues.apache.org/jira/browse/CARBONDATA-646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15831282#comment-15831282
]
Manish Gupta commented on CARBONDATA-646:
-----------------------------------------
This issue is fixed as part of PR-535
(https://github.com/apache/incubator-carbondata/pull/535). This issue can be
closed.
I have tested and attached the snapshot of data and output.
> Bad record handling is not correct for Int data type
> ----------------------------------------------------
>
> Key: CARBONDATA-646
> URL: https://issues.apache.org/jira/browse/CARBONDATA-646
> Project: CarbonData
> Issue Type: Bug
> Affects Versions: 1.0.0-incubating, 0.1.1-incubating
> Environment: Spark 1.6
> Reporter: Ramakrishna
> Assignee: Manish Gupta
> Priority: Minor
> Attachments: 646_1.PNG, 646_2.PNG
>
>
> With Bad record handling as default,
> If Char value is given for Int data type, that is handled properly(moving
> NULL).
> If Decimal values is given for Int Data type, it is stripping the decimal,
> where it should consider this as bad record and move NULL.
> Bad record csv:
> TRUE,2.7,423.0,A,200000000003454300,
> 121.5,4.99,2.44,SE3423ee,asfdsffdfg,EtryTRWT,2012-01-12
> 03:14:05.123456729,2012-01-20
> 0: jdbc:hive2://172.168.100.212:23040> select * from t_carbn01 where
> qty_total is NULL;
> +----------------+---------------+--------------+------------+---------------------+--------------+-----------------+---------+------------+-------------+--------------+------------------------+--------------+--+
> | active_status | item_type_cd | qty_day_avg | qty_total | sell_price
> | sell_pricep | discount_price | profit | item_code | item_name |
> outlet_name | update_time | create_date |
> +----------------+---------------+--------------+------------+---------------------+--------------+-----------------+---------+------------+-------------+--------------+------------------------+--------------+--+
> | TRUE | 2 | 423 | NULL |
> 200000000003454304 | 121.5 | 4.99 | 2.44 | SE3423ee |
> asfdsffdfg | EtryTRWT | 2012-01-12 03:14:05.0 | 2012-01-20 |
> +----------------+---------------+--------------+------------+---------------------+--------------+-----------------+---------+------------+-------------+--------------+------------------------+----------
> 0: jdbc:hive2://172.168.100.212:23040> desc t_carbn01;
> +-----------------+---------------+----------+--+
> | col_name | data_type | comment |
> +-----------------+---------------+----------+--+
> | active_status | string | |
> | item_type_cd | bigint | |
> | qty_day_avg | bigint | |
> | qty_total | bigint | |
> | sell_price | bigint | |
> | sell_pricep | double | |
> | discount_price | double | |
> | profit | decimal(3,2) | |
> | item_code | string | |
> | item_name | string | |
> | outlet_name | string | |
> | update_time | timestamp | |
> | create_date | string | |
> +-----------------+---------------+----------+--+
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)