You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Takeshi Yamamuro (Jira)" <ji...@apache.org> on 2019/12/29 05:52:00 UTC

[jira] [Updated] (SPARK-28322) DIV support decimal type

     [ https://issues.apache.org/jira/browse/SPARK-28322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Takeshi Yamamuro updated SPARK-28322:
-------------------------------------
    Parent Issue: SPARK-30374  (was: SPARK-27764)

> DIV support decimal type
> ------------------------
>
>                 Key: SPARK-28322
>                 URL: https://issues.apache.org/jira/browse/SPARK-28322
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Assignee: Marco Gaido
>            Priority: Major
>             Fix For: 3.0.0
>
>
> Spark SQL:
> {code:sql}
> spark-sql> SELECT DIV(CAST(10 AS DECIMAL), CAST(3 AS DECIMAL));
> Error in query: cannot resolve '(CAST(10 AS DECIMAL(10,0)) div CAST(3 AS DECIMAL(10,0)))' due to data type mismatch: '(CAST(10 AS DECIMAL(10,0)) div CAST(3 AS DECIMAL(10,0)))' requires integral type, not decimal(10,0); line 1 pos 7;
> 'Project [unresolvedalias((cast(10 as decimal(10,0)) div cast(3 as decimal(10,0))), None)]
> +- OneRowRelation
> {code}
> PostgreSQL:
> {code:sql}
> postgres=# SELECT DIV(CAST(10 AS DECIMAL), CAST(3 AS DECIMAL));
>  div
> -----
>    3
> (1 row)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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