XMLWordPrintableJSON

Details

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

    Description

      While converting dates with negative years to strings, Spark skips era sub-field by default. That's can confuse users since years from BC era are mirrored to current era. For example:

      spark-sql> select make_date(-44, 3, 15);
      0045-03-15
      

      Even negative years are out of supported range by the DATE type, it would be nice to indicate the era for such dates.

      PostgreSQL outputs the era for such inputs:

      # select make_date(-44, 3, 15);
         make_date   
      ---------------
       0044-03-15 BC
      (1 row)
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: