You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Venki Korukanti (JIRA)" <ji...@apache.org> on 2015/04/09 03:18:14 UTC
[jira] [Created] (DRILL-2729) Hive partition columns of decimal
type are deserialized incorrectly
Venki Korukanti created DRILL-2729:
--------------------------------------
Summary: Hive partition columns of decimal type are deserialized incorrectly
Key: DRILL-2729
URL: https://issues.apache.org/jira/browse/DRILL-2729
Project: Apache Drill
Issue Type: Bug
Components: Storage - Hive
Affects Versions: 0.6.0
Reporter: Venki Korukanti
Assignee: Venki Korukanti
Fix For: 0.9.0
Repro steps:
{code}
CREATE TABLE IF NOT EXISTS readtest2 (
a BOOLEAN
) PARTITIONED BY (
decimal0_part DECIMAL,
decimal9_part DECIMAL(6, 2),
decimal18_part DECIMAL(15, 5),
decimal28_part DECIMAL(23, 1),
decimal38_part DECIMAL(30, 3)
) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE;
ALTER TABLE readtest2 ADD IF NOT EXISTS PARTITION (
decimal0_part='36.9',
decimal9_part='36.9',
decimal18_part='3289379872.945645',
decimal28_part='39579334534534.35345',
decimal38_part='363945093845093890.9');
LOAD DATA LOCAL INPATH '/tmp/data.txt' OVERWRITE INTO TABLE default.readtest2 PARTITION (
decimal0_part='36.9',
decimal9_part='36.9',
decimal18_part='3289379872.945645',
decimal28_part='39579334534534.35345',
decimal38_part='363945093845093890.9');
{code}
Contents of /tmp/data.txt:
{code}
false
true
{code}
Drill output:
{code}
0: jdbc:drill:zk=10.10.30.143:5181> select * from readtest2;
+------------+---------------+---------------+----------------+----------------+----------------+
| a | decimal0_part | decimal9_part | decimal18_part | decimal28_part | decimal38_part |
+------------+---------------+---------------+----------------+----------------+----------------+
| false | 370000000000 | 369000.00 | -66367900898250.61888 | 39579334534534.4 | 363945093845093890.900 |
| true | 370000000000 | 369000.00 | -66367900898250.61888 | 39579334534534.4 | 363945093845093890.900 |
+------------+---------------+---------------+----------------+----------------+----------------+
{code}
Hive output:
{code}
hive> select * from readtest2;
OK
false 37 36.9 3289379872.94565 39579334534534.4 363945093845093890.9
true 37 36.9 3289379872.94565 39579334534534.4 363945093845093890.9
Time taken: 0.053 seconds, Fetched: 2 row(s)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)