liukun4515 commented on code in PR #2357:
URL: https://github.com/apache/arrow-rs/pull/2357#discussion_r940316114
##########
parquet/src/arrow/array_reader/primitive_array.rs:
##########
@@ -208,7 +210,7 @@ where
))
}
}
- .with_precision_and_scale(p, s)?;
+ .with_precision_and_scale(p, s, false)?;
Review Comment:
> I want to take a step back before undertaking any of these, as frankly I
am deeply confused by what this precision argument is actually for - why
arbitrarily truncate your value space?
In order to represent the decimal, some system or rule just use the siged
integer to store the data, and scale/precision just as the metadata. We can get
the exact value from this two parts.
For example decimal(3,1), the value of `10.1` will be stored/encoded as 101.
@tustvold
Maybe the parquet doc can help you
https://github.com/apache/parquet-format/blob/54e53e5d7794d383529dd30746378f19a12afd58/src/main/thrift/parquet.thrift#L67
https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#decimal
--
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]