Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1312

Return type of TIMESTAMP_ADD applied to a DATE should be TIMESTAMP if unit is smaller than DAY

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.9.0
    • core
    • None

    Description

      timestamp_add("MINUTE", 1, date '2016-06-15') returns 2016-06-15 since it returns a date and therefore truncates the minute informtion. timestamp_add should return timestamp instead of date for units less than date.

      timestamp_diff with date doesn't handle null properly (in type inference), converted type is INTEGER NOT NULL (when it should be null).

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            minjikim MinJi Kim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: