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

GROUP BY in a cross engine subquery generates bad results

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.6, 1.0.7
    • 1.0.11, 1.1.0
    • None
    • None
    • 2017-9, 2017-15, 2017-16

    Description

      The following SSB query fails with an empty set when dateinfo is a MyISAM table and the other tables are ColumnStore (which happens when (day of year + 2) mod 6 = 2)

      select   lo_shipmode, c_region,  sum(lo_extendedprice), count(*) from     
         lineorder join customer on lo_custkey = c_custkey  
           where lo_orderdate between 
                (select d_start  from 
                   (select d_yearmonthnum * 100 + 1 d_start  , count(*) from dateinfo 
                                      where d_weekdayfl = 1 and d_year = 1998 
                                            group by 1 order by 2 desc limit 1) 
                 alias1) 
                 and 
                 (select d_end  from 
                    (select d_yearmonthnum * 100 + 31 d_end, count(*) from dateinfo 
                                      where d_weekdayfl = 1 and d_year = 1998 group by 1 order by 2 desc limit 1)
                 alias2) group by 1,2 order by 1,2;
      

      Replacing the dateinfo subqueries with fixed values the query succeeds. It appears to be an issue with the CrossEngine step.

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              LinuxJedi Andrew Hutchings (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.