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: [email protected]
For additional commands, e-mail: [email protected]