Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-3949

IF() is incorrect when using hex constant

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.5.3
    • 1.5.1
    • PrimProc
    • None
    • 2020-7

    Description

      Consider the following:

      select  IF(r_regionkey >= 0x40000000, r_regionkey+10, r_regionkey)   page from region cc order by 1 ;
      

      This returns r_regionkey+10, even though all r_regionkey are < 5.

      Replacing 0x40000000 with it's base 10 equivalent (1073741824) does not exhibit the bug.

      Debugging shows that the constant column is malformed when it reaches the IF function.

      This is a regression in 1.5. columnstore 1.4.4 returns the correct response, and debugging shows the constant column is correct.

      Attachments

        Activity

          David.Hall David Hall (Inactive) created issue -
          David.Hall David Hall (Inactive) made changes -
          Field Original Value New Value
          Description Consider the following:
          {code:java}
          select IF(r_regionkey >= 0x40000000, r_regionkey+10, r_regionkey) page from region cc order by 1 ;
          {code}
          This returns r_regionkey+10, even though all r_regionkey are < 5.

          Debugging shows that the constant column is malformed when it reaches the IF function.

          This is a regression in 1.5. columnstore 1.4.4 returns the correct response, and debugging shows the constant column is correct.
          Consider the following:
          {code:java}
          select IF(r_regionkey >= 0x40000000, r_regionkey+10, r_regionkey) page from region cc order by 1 ;
          {code}
          This returns r_regionkey+10, even though all r_regionkey are < 5.

          Replacing 0x40000000 with it's base 10 equivalent (1073741824) does not show the bug.

          Debugging shows that the constant column is malformed when it reaches the IF function.

          This is a regression in 1.5. columnstore 1.4.4 returns the correct response, and debugging shows the constant column is correct.
          David.Hall David Hall (Inactive) made changes -
          Description Consider the following:
          {code:java}
          select IF(r_regionkey >= 0x40000000, r_regionkey+10, r_regionkey) page from region cc order by 1 ;
          {code}
          This returns r_regionkey+10, even though all r_regionkey are < 5.

          Replacing 0x40000000 with it's base 10 equivalent (1073741824) does not show the bug.

          Debugging shows that the constant column is malformed when it reaches the IF function.

          This is a regression in 1.5. columnstore 1.4.4 returns the correct response, and debugging shows the constant column is correct.
          Consider the following:
          {code:java}
          select IF(r_regionkey >= 0x40000000, r_regionkey+10, r_regionkey) page from region cc order by 1 ;
          {code}
          This returns r_regionkey+10, even though all r_regionkey are < 5.

          Replacing 0x40000000 with it's base 10 equivalent (1073741824) does not exhibit the bug.

          Debugging shows that the constant column is malformed when it reaches the IF function.

          This is a regression in 1.5. columnstore 1.4.4 returns the correct response, and debugging shows the constant column is correct.
          David.Hall David Hall (Inactive) made changes -
          Assignee David Hall [ david.hall ]
          David.Hall David Hall (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          David.Hall David Hall (Inactive) made changes -
          Assignee David Hall [ david.hall ] Roman [ drrtuy ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          David.Hall David Hall (Inactive) made changes -
          Sprint 2020-7 [ 410 ]
          David.Hall David Hall (Inactive) made changes -
          Status In Review [ 10002 ] In Testing [ 10301 ]
          David.Hall David Hall (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status In Testing [ 10301 ] Closed [ 6 ]
          toddstoffel Todd Stoffel (Inactive) made changes -
          Rank Ranked higher
          toddstoffel Todd Stoffel (Inactive) made changes -
          Fix Version/s 1.5.0 [ 24513 ]
          Fix Version/s 1.5 [ 22800 ]
          toddstoffel Todd Stoffel (Inactive) made changes -
          Affects Version/s 1.5.3 [ 24412 ]
          Affects Version/s 1.5 [ 22800 ]
          toddstoffel Todd Stoffel (Inactive) made changes -
          Fix Version/s 1.5.1 [ 24514 ]
          Fix Version/s 1.5.0 [ 24513 ]

          People

            drrtuy Roman
            David.Hall David Hall (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.