Hi there,

I know (py)arrow has the decimal128() type, and using this type it's easy
to take an array of Python Decimals, convert to a pa.array, and write out
to Parquet.

In the absence (afaict) of decimal32 and decimal64 types, is it possible to
go from an array of Decimals (with compatible precision/scale) and write
them to a parquet column of 32- or 64- bit width?

Relevant parquet spec --
https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#decimal

I'm looking to add this functionality to the project Spectrify, as AWS
Redshift Spectrum will not query unnecessarily-wide DECIMAL columns --
https://github.com/hellonarrativ/spectrify/issues/14

Thanks,
Colin

Reply via email to