-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PARQUET-2264: Allow scale == precision for DecimalType #198
PARQUET-2264: Allow scale == precision for DecimalType #198
Conversation
The majority of implementations allow for scale == precision. See apache/arrow-rs#1607 for further motivation.
@@ -219,7 +219,7 @@ decimal point, and the precision stores the maximum number of digits supported | |||
in the unscaled value. | |||
|
|||
If not specified, the scale is 0. Scale must be zero or a positive integer less | |||
than the precision. Precision is required and must be a non-zero positive | |||
than or equal to the precision. Precision is required and must be a non-zero positive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Could you also add the comment to the thrift definition: https://github.com/apache/parquet-format/blob/master/src/main/thrift/parquet.thrift#L253 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
I've do an experiment with C++ arrow parquet, and it's able to write decimal with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @devinrsmith and @mapleFU !
The majority of implementations allow for scale == precision.
See apache/arrow-rs#1607 for further motivation.