You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "XiDuo You (Jira)" <ji...@apache.org> on 2023/01/31 04:25:00 UTC

[jira] [Created] (SPARK-42251) Forbid deicmal(0, 0)

XiDuo You created SPARK-42251:
---------------------------------

             Summary: Forbid deicmal(0, 0)
                 Key: SPARK-42251
                 URL: https://issues.apache.org/jira/browse/SPARK-42251
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.5.0
            Reporter: XiDuo You


Spark does not actually support decimal(0, 0). e.g.

 
-- work with in-memory catalogcreate table t (c decimal(0, 0)) using parquet;-- fail with parquet-- java.lang.IllegalArgumentException: Invalid DECIMAL precision: 0--	at org.apache.parquet.Preconditions.checkArgument(Preconditions.java:57)insert into table t values(0);-- fail with hive catalog-- Caused by: java.lang.IllegalArgumentException: Decimal precision out of allowed range [1,38]--	at org.apache.hadoop.hive.serde2.typeinfo.HiveDecimalUtils.validateParameter(HiveDecimalUtils.java:44)create table t (c decimal(0, 0)) using parquet;



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org