Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3350

SQL CAST always marks its type as nullable even if the expression to be cast is not nullable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.4.1.3
    • 10.4.1.3
    • SQL
    • None

    Description

      Can be exposed as a column's type in a ResultSet being nullable when in reality it can never be null.

      Can impact performance as the SQL compiler can general optimal paths with correct nullability, e.g. a non-null INTEGER expression does not need normalization if being stored in a non-null INTEGER column, routine calling can be optimized for a RETURNS NULL ON NULL INPUT function if the inputs are never null.

      Attachments

        1. derby3350_code_diff.txt
          0.6 kB
          Daniel John Debrunner

        Activity

          People

            djd Daniel John Debrunner
            djd Daniel John Debrunner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: