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

IDB-9024 - is not in tuple - window function and subselects

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Do
    • 1.2.5
    • Icebox
    • N/A
    • None
    • debian 9

    Description

      window functions such as sum() over() or avg() over() with a subselect throw 'is not in tuple' error.

      only on columnstore tables, not on innodb or tokudb tables

      drop table if exists t;
      create table t (a decimal(7,2),b decimal(7,2)) engine=ColumnStore;
      insert into t(a,b) values (1,1),(2,3),(3,4);
       
      -- query 1, works fine
      -- for each row, return the percentage that the sum of 2 columns a and b represents in the total of all rows
      select
      (a+b)/sum(a+b) over()
      from t;
       
      -- query 2, Error 1815, IDB-9024, 'b' is not in tuple
      -- same as query1, just an extra subselect
      select
      (a+b)/sum(a+b) over()
      from (
      	select a,b from t
      )t1;
       
      -- query 3, works fine
      -- same as query1, just sum(a) instead of sum(a+b)
      select
      a/sum(a) over()
      from (
      	select a,b from t
      )t1;
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            alebacq antoine
            Votes:
            1 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.