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

IN clause not properly evaluated in where

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.6
    • 1.4.4, 1.5.1
    • MariaDB Server
    • None
    • debian9
    • 2020-2, 2020-3, 2020-4, 2020-5, 2020-6, 2020-7

    Description

      IN() clause does not evaluate properly on some columns with a window function

      in the example below, the column r is computed with the function DENSE_RANK in a subselect, and there is a where r in (...). The where clause does not filter rows as expected.

      Note that rows are properly filtered if the where clause is rewritten as (r=1 or r=2)

      create table t(a int, b int) engine=ColumnStore;
      insert into t(a,b) values(1,4),(2,3),(3,2),(4,1);

      select
      a,
      r
      from (
      select
      a,
      DENSE_RANK() OVER `w_0` as `r`
      from t
      WINDOW `w_0` as ( ORDER BY `b` DESC)
      ) t0
      where r in (1,2)

      => returns
      1,1
      2,2
      3,3
      4,4

      instead of just the first 2 rows

      Attachments

        Activity

          alebacq antoine created issue -
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Field Original Value New Value
          Fix Version/s 1.2.4 [ 23254 ]
          LinuxJedi Andrew Hutchings (Inactive) made changes -
          Fix Version/s 1.2 [ 22554 ]
          Fix Version/s 1.2.4 [ 23254 ]
          toddstoffel Todd Stoffel (Inactive) made changes -
          Rank Ranked higher
          toddstoffel Todd Stoffel (Inactive) made changes -
          Rank Ranked higher
          toddstoffel Todd Stoffel (Inactive) made changes -
          Rank Ranked higher
          jrojas Jose Rojas (Inactive) made changes -
          Assignee Jose Rojas [ jrojas ]
          David.Hall David Hall (Inactive) made changes -
          Sprint 2020-2 [ 382 ]
          David.Hall David Hall (Inactive) made changes -
          Story Points 2
          jrojas Jose Rojas (Inactive) made changes -
          Fix Version/s 1.4.4 [ 24039 ]
          Fix Version/s 1.2 [ 22554 ]
          David.Hall David Hall (Inactive) made changes -
          Sprint 2020-2 [ 382 ] 2020-2, 2020-3 [ 382, 383 ]
          jrojas Jose Rojas (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          David.Hall David Hall (Inactive) made changes -
          Sprint 2020-2, 2020-3 [ 382, 383 ] 2020-2, 2020-3, 2020-4 [ 382, 383, 392 ]
          toddstoffel Todd Stoffel (Inactive) made changes -
          Team ColumnStore Team
          jrojas Jose Rojas (Inactive) made changes -
          Assignee Jose Rojas [ jrojas ] Roman [ drrtuy ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          David.Hall David Hall (Inactive) made changes -
          Sprint 2020-2, 2020-3, 2020-4 [ 382, 383, 392 ] 2020-2, 2020-3, 2020-4, 2020-5 [ 382, 383, 392, 396 ]
          David.Hall David Hall (Inactive) made changes -
          Sprint 2020-2, 2020-3, 2020-4, 2020-5 [ 382, 383, 392, 396 ] 2020-2, 2020-3, 2020-4 [ 382, 383, 392 ]
          David.Hall David Hall (Inactive) made changes -
          Sprint 2020-2, 2020-3, 2020-4 [ 382, 383, 392 ] 2020-2, 2020-3, 2020-4, 2020-5 [ 382, 383, 392, 396 ]
          jrojas Jose Rojas (Inactive) made changes -
          Assignee Roman [ drrtuy ] Jose Rojas [ jrojas ]
          jrojas Jose Rojas (Inactive) made changes -
          Assignee Jose Rojas [ jrojas ] Roman [ drrtuy ]
          David.Hall David Hall (Inactive) made changes -
          Sprint 2020-2, 2020-3, 2020-4, 2020-5 [ 382, 383, 392, 396 ] 2020-2, 2020-3, 2020-4, 2020-5, 2020-6 [ 382, 383, 392, 396, 404 ]
          jrojas Jose Rojas (Inactive) made changes -
          Assignee Roman [ drrtuy ] Jose Rojas [ jrojas ]
          jrojas Jose Rojas (Inactive) made changes -
          Fix Version/s 1.5 [ 22800 ]
          jrojas Jose Rojas (Inactive) made changes -
          Assignee Jose Rojas [ jrojas ] Roman [ drrtuy ]
          drrtuy Roman made changes -
          Status In Review [ 10002 ] In Testing [ 10301 ]
          drrtuy Roman made changes -
          Assignee Roman [ drrtuy ] Daniel Lee [ dleeyh ]
          David.Hall David Hall (Inactive) made changes -
          Sprint 2020-2, 2020-3, 2020-4, 2020-5, 2020-6 [ 382, 383, 392, 396, 404 ] 2020-2, 2020-3, 2020-4, 2020-5, 2020-6, 2020-7 [ 382, 383, 392, 396, 404, 410 ]
          David.Hall David Hall (Inactive) made changes -
          Rank Ranked higher
          dleeyh Daniel Lee (Inactive) made changes -
          issue.field.resolutiondate 2020-04-30 16:18:30.0 2020-04-30 16:18:30.979
          dleeyh Daniel Lee (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status In Testing [ 10301 ] Closed [ 6 ]
          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 -
          Fix Version/s 1.5.1 [ 24514 ]
          Fix Version/s 1.5.0 [ 24513 ]

          People

            dleeyh Daniel Lee (Inactive)
            alebacq antoine
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.