Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL
    • None

    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

          Activity

            People

              mgaido Marco Gaido
              yumwang Yuming Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: