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

UDAF + multiple DISTINCT in projection produces an invalid answer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.4.1
    • Fix Version/s: Icebox
    • Component/s: None
    • Labels:
      None

      Description

      Here is the way to reproduce.

      DROP TABLE IF EXISTS cs1;
       
      CREATE TABLE cs1 (d1 DECIMAL(18), d2 DECIMAL(18,10), d3 DECIMAL(18,18), d4 DECIMAL(18),d5 DECIMAL(18),i1 INT) ENGINE=columnstore;
       
      INSERT INTO cs1 VALUES
          (1234,5678,-0.1234567890,2,1,1),     
          (1234,-5678,0.1234567890,2,1,1),
          (123456789012,12345012.9012345678,0.12345634567890,2,1,1),
          (NULL,NULL,NULL,2,1,1),
          (0,0,0,2,1,1),
          (1234,5678,0.123456789012345678,3,2,2),
          (-123456789123456789,-5678,0.123456782345678,3,2,2),
          (12345678901234567,1234524.9012345678,0.1234567895678908,3,2,2),
          (NULL,NULL,NULL,3,2,2),
          (0,0,0,3,2,2),
          (1234,5678,-0.12345673,11111111111111111,1,1),
          (1234,5678,-0.12345673,11111111111111111,1,1),
          (1234,5678,-0.12345673,11111111111111112,1,1); 
      select  regr_avgx(d1,d2), count(distinct (d4)), count(distinct (d3)), count(distinct (d2)) from cs1 group by d1;
      

      One of the columns has all zeros.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              drrtuy Roman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration