Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-29836 PostgreSQL dialect: cast
  3. SPARK-29840

PostgreSQL dialect: cast to integer

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0
    • None
    • SQL
    • None

    Description

      Make SparkSQL's cast to integer behavior be consistent with PostgreSQL when

      spark.sql.dialect is configured as PostgreSQL.

      Example:currently spark sql

      spark-sql> select   CAST ('10C' AS INTEGER);
      NULL
      Time taken: 0.051 seconds, Fetched 1 row(s)
      spark-sql>
      

      postgresql

      postgresql
      select   CAST ('10C' AS INTEGER);
      Error(s), warning(s):
      
      22P02: invalid input syntax for integer: "10C"
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jobitmathew jobit mathew
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: