XMLWordPrintableJSON

Details

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

    Description

      Currently, `null + interval` will become `cast(cast(null as timestamp) + interval) as null`. This is a unexpected behavior and the result should not be of null type.
      This weird behavior applies to `null - interval`, `interval + null`, `interval - null` as well.
      To change it, I propose to cast the null as the same data type of the other element in the add/subtract:
      ```
      null + interval => cast(null as interval) + interval
      null - interval => cast(null as interval) - interval
      interval + null=> interval + cast(null as interval)
      interval - null => interval - cast(null as interval)
      ```

      Attachments

        Activity

          People

            Gengliang.Wang Gengliang Wang
            Gengliang.Wang Gengliang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: