You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/25 03:07:07 UTC

[GitHub] [arrow-rs] sergiimk opened a new issue #713: Decimal logical type is formatted incorrectly by print_schema

sergiimk opened a new issue #713:
URL: https://github.com/apache/arrow-rs/issues/713


   **Describe the bug**
   When printing out the schema of a parquet file (written by Spark) using Java implementation of `parquet-schema` I get:
   ```gql
   message spark_schema {
     optional fixed_len_byte_array(9) price_usd (DECIMAL(19,4));
     ...
   }
   ```
   But when I use `parquet::schema::printer::print_schema` I get:
   ```gql
   message spark_schema {
     OPTIONAL FIXED_LEN_BYTE_ARRAY (9) price_usd (DECIMAL4, 19);
     ...
   }
   ```
   Issues:
   * The missing opening bracket (minor)
   * The inversed order of precision and scale
   
   Parquet spec doesn't seem to describe the textual representation of schema, and in Thrift file the order is [scale, precision](https://github.com/apache/parquet-format/blob/master/src/main/thrift/parquet.thrift#L254-L255) but in SQL representation of DECIMAL (which Java implementation seems to be following) the order is `precision{, scale}`.
   
   **To Reproduce**
   Use `print_schema` on a Parquet file containing decimals.
   
   **Expected behavior**
   Logical type is correctly formatted and follows conventional style `DECIMAL(precision, scale)`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-rs] alamb closed issue #713: Decimal logical type is formatted incorrectly by print_schema

Posted by GitBox <gi...@apache.org>.
alamb closed issue #713:
URL: https://github.com/apache/arrow-rs/issues/713


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-rs] alamb closed issue #713: Decimal logical type is formatted incorrectly by print_schema

Posted by GitBox <gi...@apache.org>.
alamb closed issue #713:
URL: https://github.com/apache/arrow-rs/issues/713


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-rs] alamb closed issue #713: Decimal logical type is formatted incorrectly by print_schema

Posted by GitBox <gi...@apache.org>.
alamb closed issue #713:
URL: https://github.com/apache/arrow-rs/issues/713


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org