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

Sql. Functions. Type coercion of function arguments (SUBSTR function).

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0-beta1
    • None
    • sql
    • Docs Required, Release Notes Required

    Description

      Calls to SUBSTR function with arguments of not compatible types does not cause validation errors in some cases:

      # 1
      SELECT SUBSTR(100, 1)}
      
      IgniteProject(EXPR$0=[SUBSTR(_UTF-8'100':VARCHAR CHARACTER SET "UTF-8", 1)]), id = 20
        IgniteValues(tuples=[[{ 0 }]]), id = 18
      
      # 2
      SELECT SUBSTR('123456789', '1')}
      
      IgniteProject(EXPR$0=[SUBSTR(_UTF-8'123456789', 1:BIGINT)]), id = 41
        IgniteValues(tuples=[[{ 0 }]]), id = 39
      {code}
      
      # 3
      SELECT SUBSTR('0000'::UUID, 1)}
      
      IgniteProject(EXPR$0=[SUBSTR(CAST(_UTF-8'0000'):UUID NOT NULL, 1)]), id = 83
        IgniteValues(tuples=[[{ 0 }]]), id = 81
      
      # 4
      SELECT SUBSTR('123456789', ?, 1)
      
      Dynamic parameters: [00000000-0000-0000-0000-000000000000 <java.util.UUID>]
      
      IgniteProject(EXPR$0=[SUBSTR(_UTF-8'123456789', ?0, 1)]), id = 104
        IgniteValues(tuples=[[{ 0 }]]), id = 102
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: