liukun4515 commented on PR #3431:
URL: https://github.com/apache/arrow-rs/pull/3431#issuecomment-1370428422

   > What is the ecosystem support for this like? Do all arrow implementations 
understand how to convert to a decimal128 from i32 or i64? Just wondering if we 
need to put this behind an optional flag?
   
   
   This implementation just contains the writer path for parquet file for 
decimal data, and 
   just following the definition of parquet format: 
https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#decimal
   
   ```
   DECIMAL can be used to annotate the following types:
   
   int32: for 1 <= precision <= 9
   int64: for 1 <= precision <= 18; precision < 10 will produce a warning
   fixed_len_byte_array: precision is limited by the array size. Length n can 
store <= floor(log_10(2^(8*n - 1) - 1)) base-10 digits
   binary: precision is not limited, but is required. The minimum number of 
bytes to store the unscaled value should be used.
   ```
   
   > Do all arrow implementations understand how to convert to a decimal128 
from i32 or i64?
   
   I think the data in the arrow ecosystem is exchanged by IPC format for the 
different language like `rust -> java`, or `c++ -> rust`.
   
   cc @tustvold 
   
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to