Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-18761

Sql. TypeOf can short-circuit only when its argument is a constant expression.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0
    • sql

    Description

      The current implement of typeof simply checks the type its operand but this is not correct because the operand maybe an invalid expression or a function that produces a side effect.
      MRE:

      assertThrows(RuntimeException.class, () -> assertQuery("SELECT TYPEOF(CAST('NOT_A_NUMBER' AS INTEGER))").check());
      

      This query should return an error but it returns a string INTEGER.

      Attachments

        Issue Links

          Activity

            People

              mzhuravkov Maksim Zhuravkov
              mzhuravkov Maksim Zhuravkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m