[ https://issues.apache.org/jira/browse/DRILL-2338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14340725#comment-14340725 ]
Ramana Inukonda Nagaraj commented on DRILL-2338: ------------------------------------------------ Happens for dec28 as well. 0: jdbc:drill:> create table decimal28_bug as select cast('1.2' as decimal(28,2)) from cp.`employee.json` limit 1; +------------+---------------------------+ | Fragment | Number of records written | +------------+---------------------------+ | 0_0 | 1 | +------------+---------------------------+ 1 row selected (0.271 seconds) 0: jdbc:drill:> select * from decimal28_bug; +------------+ | EXPR$0 | +------------+ | 12000000.00 | +------------+ 1 row selected (0.063 seconds) > DECIMAL 38 when stored as a required datatype results in wrong data > ------------------------------------------------------------------- > > Key: DRILL-2338 > URL: https://issues.apache.org/jira/browse/DRILL-2338 > Project: Apache Drill > Issue Type: Bug > Components: Storage - Parquet > Affects Versions: 0.8.0 > Reporter: Ramana Inukonda Nagaraj > Assignee: Mehant Baid > > Writing out a decimal 38 column by casting a literal results in a different > value being written out. > {code} > 0: jdbc:drill:> create table mehant_bug as select cast('1.2' as > decimal(38,2)) from cp.`employee.json` limit 1; > 0: jdbc:drill:> select * from mehant_bug; > +------------+ > | EXPR$0 | > +------------+ > | 12000000.00 | > +------------+ > 1 row selected (0.08 seconds) > {code} > [root@perfnode167 impala_parquet]# > parquet-tools-1.5.1-SNAPSHOT/parquet-schema ../mehant_bug/0_0_0.parquet > message root { > required fixed_len_byte_array(16) EXPR$0 (DECIMAL(38,2)); > } > If the column is stored as optional we do not have this issue. -- This message was sent by Atlassian JIRA (v6.3.4#6332)