You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/05/04 17:00:00 UTC
[jira] [Updated] (SPARK-50610) we should fix the decimal precision on function toInspector(dataType: DataType) in HiveInspectors class
[ https://issues.apache.org/jira/browse/SPARK-50610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated SPARK-50610:
-----------------------------------
Labels: decimal pull-request-available (was: decimal)
> we should fix the decimal precision on function toInspector(dataType: DataType) in HiveInspectors class
> -------------------------------------------------------------------------------------------------------
>
> Key: SPARK-50610
> URL: https://issues.apache.org/jira/browse/SPARK-50610
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.4.4, 3.5.3
> Reporter: zuotingbing
> Priority: Major
> Labels: decimal, pull-request-available
> Attachments: image-2024-12-19-08-45-13-688.png, image-2024-12-19-08-54-19-895.png
>
>
> When we add some mask UDF on Decimal(18,10) type coloumn in hive-sdf moudle, the scale of the mask result value should be 10, but now is 18.
> In JavaHiveDecimalObjectInspector class the default precision of Decimal is (38,18), so we need to change to the correct decimal precision on function toInspector(dataType: DataType) in HiveInspectors class.
> Can somebody fix it?
>
> STEP:
> create table testtbl(c1 decimal(18,10), c2 double);
> decimal type mask the result is :
> !image-2024-12-19-08-54-19-895.png!
--
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