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/01/24 12:17:28 UTC

[GitHub] [arrow] ovr commented on pull request #9232: ARROW-10818: [Rust] Implement DecimalType

ovr commented on pull request #9232:
URL: https://github.com/apache/arrow/pull/9232#issuecomment-766338705


   > Looking at the spec, a decimal type only supports 128 and 256 bits. So, I am not understanding why we are trying to add support for Int32,Int64,Int128,LargeDecimal here.
   
   Arrow is used inside DF, which is used to build databases on to of it. If the user defines `DECIMAL(2,2)` it's a bit overhead to use i128 as representation for it.
   
   1. Memory usage, `DecimalArray<Decimal128>` will use 16 bytes for each element.
   2. Performance, Rust is using LLVM, which allows integers of any bit width from 1 to 2^23. Inside LLVM backend for x86-64, It will use rax, rcx to store it.
   
   It's ok to store DECIMAL(2,2) as Int64 inside parquet (but anyway overhead), but it's not great to use it as memory type.


----------------------------------------------------------------
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.

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