Description
Spark 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
PostgreSQL:
postgres=# SELECT DIV(CAST(10 AS DECIMAL), CAST(3 AS DECIMAL)); div ----- 3 (1 row)
Attachments
Issue Links
- links to