[ 
https://issues.apache.org/jira/browse/PARQUET-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17288294#comment-17288294
 ] 

Gabor Szadovszky commented on PARQUET-1986:
-------------------------------------------

After reading the description more carefully it seems to be an Avro issue and 
not Parquet. The module parquet-avro is responsible to convert the avro schema 
to parquet schema and the related conversions for the values at write time and 
vice versa at read time. Parquet has nothing to do with converting BigDecimal 
values to binary (fixed), not talking about JSON. Please, try to reproduce the 
issue without using parquet-avro and read/write avro files directly.

> Request for Parquet Documentation for Fixed Decimal Type in JSON data 
> representation
> ------------------------------------------------------------------------------------
>
>                 Key: PARQUET-1986
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1986
>             Project: Parquet
>          Issue Type: Wish
>          Components: parquet-avro
>    Affects Versions: 1.8.0
>            Reporter: Divya
>            Priority: Major
>              Labels: decimal, fixed, java, parquet
>
> We are trying to use a fixed type for logicalType Decimal. We create JSON and 
> then convert it into Parquet. There, we are trying to call 
> conversion.toFixed(), but it is returning in bytes (Array.toString(bytes)). 
> We are using Avro 1.8 version.
>  
> BigDecimal d1 = new BigDecimal("124.56")
> LogicalType decimal = LogicalTypes.decimal(9, 2);
> Schema fixedSchema = Schema.createFixed(Schema.Type.FIXED.name, null, null, 
> 16);
> Conversion<BigDecimal> conversion = new Conversions.DecimalConversion();
> GenericFixed d1fixed = conversion.toFixed(d1, fixedSchema, decimal);
>  
>  
> Is there any method that we can use to convert it into 'Fixed text' that 
> JSONDecoder is expecting? Any help will be appreciated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to