Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-24403 Improve behaviour of CAST
  3. FLINK-24421

Casting from a string to a DATE and TIME allows incomplete strings

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.15.0
    • None
    • The defaults for casting incomplete strings like `"12"` to TIME have changed from `12:01:01` to `12:00:00`.

    Description

      The following 2 examples are allowed and produce weird DATE and TIME result objects where normally they should fail.

      .from(STRING(), "123").resultsIn(LocalDate.of(123, 1, 1))

      .from(STRING(), "123").resultsIn(LocalTime.of(23, 1, 1))

      Attachments

        Issue Links

          Activity

            People

              matriv Marios Trivyzas
              matriv Marios Trivyzas
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: