You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (JIRA)" <ji...@apache.org> on 2019/07/10 02:55:00 UTC
[jira] [Created] (SPARK-28322) DIV support decimal type
Yuming Wang created SPARK-28322:
-----------------------------------
Summary: 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
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
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org