Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-27764 Feature Parity between PostgreSQL and Spark
  3. SPARK-29342

Make casting strings to intervals case insensitive

    XMLWordPrintableJSON

Details

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

    Description

      PostgreSQL is not sensitive to case of interval string values:

      maxim=# select cast('10 Days' as INTERVAL);
       interval 
      ----------
       10 days
      (1 row)
      

      but Spark is not tolerant to case:

      spark-sql> select cast('INTERVAL 10 DAYS' as INTERVAL);
      NULL
      spark-sql> select cast('interval 10 days' as INTERVAL);
      interval 1 weeks 3 days
      

       

      Attachments

        Issue Links

          Activity

            People

              maxgekk Max Gekk
              maxgekk Max Gekk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: