You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2024/03/22 14:17:00 UTC
[jira] [Created] (PARQUET-2452) Inlcude scale and precision in error message when scale > precision
Elliotte Rusty Harold created PARQUET-2452:
----------------------------------------------
Summary: Inlcude scale and precision in error message when scale > precision
Key: PARQUET-2452
URL: https://issues.apache.org/jira/browse/PARQUET-2452
Project: Parquet
Issue Type: Improvement
Reporter: Elliotte Rusty Harold
In Types.java we find this block of code:
{code:java}
Preconditions.checkArgument(precision > 0,
"Invalid DECIMAL precision: %s", precision);
Preconditions.checkArgument(this.scale >= 0,
"Invalid DECIMAL scale: %s", this.scale);
Preconditions.checkArgument(this.scale <= precision,
"Invalid DECIMAL scale: cannot be greater than precision");
{code}
My program tripped the third precondition and it was harder to debug than it should have been because the scale and precision that violated the rule were not shown. Include both of these as in the previous two messages.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org