You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Tim Armstrong (Jira)" <ji...@apache.org> on 2020/06/17 03:54:00 UTC

[jira] [Assigned] (IMPALA-2515) Impala rejects Parquet schemas where decimal fixed_len_byte_array columns have unnecessary padding bytes

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

Tim Armstrong reassigned IMPALA-2515:
-------------------------------------

    Assignee: Tim Armstrong

> Impala rejects Parquet schemas where decimal fixed_len_byte_array columns have unnecessary padding bytes
> --------------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-2515
>                 URL: https://issues.apache.org/jira/browse/IMPALA-2515
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Backend
>    Affects Versions: Impala 2.3.0
>            Reporter: Taras Bobrovytsky
>            Assignee: Tim Armstrong
>            Priority: Minor
>              Labels: ramp-up
>         Attachments: image-2020-02-07-11-31-38-074.png, image-2020-02-07-11-31-43-641.png, image-2020-02-07-11-33-27-944.png, image-2020-02-07-11-34-04-220.png, image-2020-02-07-11-36-31-458.png, image-2020-02-07-11-48-35-179.png
>
>
> Impala cannot read this:
> {code}
> {"name": "tmp_1",
>  "type": "fixed",
>  "size": 8,
>  "logicalType": "decimal",
>  "precision": 10,
>  "scale": 5}
> {code}
> However, this can be read:
> {code}
> {"name": "tmp_1",
>  "type": "fixed",
>  "size": 5,
>  "logicalType": "decimal",
>  "precision": 10,
>  "scale": 5}
> {code}
> Size must be precisely set to this, or Impala is unable to read the decimal column:
> {code}
> size = int(math.ceil((math.log(2, 10) + precision) / math.log(256, 10)))
> {code}
> There is nothing in the Parquet spec that says that Decimal columns must be sized precisely. Arguably it's a bug in the writer if it's doing it, because it's just wasting space.
> https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#decimal



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org