Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
feat(parquet): add support decimal256 read/write in parquet
Browse files Browse the repository at this point in the history
  • Loading branch information
TCeason committed Feb 21, 2023
1 parent 615300b commit a87ae9d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/io/parquet/write/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,20 @@ pub fn to_parquet_type(field: &Field) -> Result<ParquetType> {
None,
)?)
}
DataType::Decimal256(precision, scale) => {
let precision = *precision;
let scale = *scale;
let logical_type = Some(PrimitiveLogicalType::Decimal(precision, scale));

Ok(ParquetType::try_from_primitive(
name,
PhysicalType::FixedLenByteArray(16),
repetition,
None,
logical_type,
None,
)?)
}
DataType::Interval(_) => Ok(ParquetType::try_from_primitive(
name,
PhysicalType::FixedLenByteArray(12),
Expand Down

0 comments on commit a87ae9d

Please sign in to comment.