You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@quickstep.apache.org by "Rathijit Sen (JIRA)" <ji...@apache.org> on 2016/06/27 23:31:57 UTC

[jira] [Created] (QUICKSTEP-32) Failure on Group By hash table merge

Rathijit Sen created QUICKSTEP-32:
-------------------------------------

             Summary: Failure on Group By hash table merge
                 Key: QUICKSTEP-32
                 URL: https://issues.apache.org/jira/browse/QUICKSTEP-32
             Project: Apache Quickstep
          Issue Type: Bug
          Components: Expressions, Storage
         Environment: repo version: 714874ce54e12972285a43f92784ef6954a8b6fd

            Reporter: Rathijit Sen


The following testcase needs to be run with many worker threads (and multiple times) so that more than 1 hash table is created and the merge operation is triggered.

The merge fails with the error "AggregationHandleDistinct does not support mergeGroupByHashTables". The Distinct handle is selected in the constructor of storage/AggregationOperationState.

The testcase has been extracted from "query_optimizer/tests/execution_generator/Join.test".

CREATE TABLE a(w INT, x LONG, y DOUBLE, z VARCHAR(16));
CREATE TABLE b(w INT, x LONG);
CREATE TABLE c(x LONG, y DOUBLE);
CREATE TABLE d(y DOUBLE, z VARCHAR(16));

INSERT INTO a VALUES(0, 0, 0, 'C0');
INSERT INTO a VALUES(1, 10, 100, 'C1');
INSERT INTO a VALUES(2, 20, 200, 'C2');
INSERT INTO a VALUES(3, 30, 300, 'C3');
INSERT INTO a VALUES(4, 40, 400, 'C4');
INSERT INTO a VALUES(5, 50, 500, 'C5');
INSERT INTO a VALUES(6, 60, 600, 'C6');
INSERT INTO a VALUES(7, 70, 700, 'C7');
INSERT INTO a VALUES(8, 80, 800, 'C8');
INSERT INTO a VALUES(9, 90, 900, 'C9');
INSERT INTO a VALUES(10, 100, 1000, 'C10');
INSERT INTO a VALUES(11, 110, 1100, 'C11');
INSERT INTO a VALUES(12, 120, 1200, 'C12');
INSERT INTO a VALUES(13, 130, 1300, 'C13');
INSERT INTO a VALUES(14, 140, 1400, 'C14');
INSERT INTO a VALUES(15, 150, 1500, 'C15');
INSERT INTO a VALUES(16, 160, 1600, 'C16');
INSERT INTO a VALUES(17, 170, 1700, 'C17');
INSERT INTO a VALUES(18, 180, 1800, 'C18');
INSERT INTO a VALUES(19, 190, 1900, 'C19');

INSERT INTO b
SELECT w, x + (w/2)%2
FROM a
WHERE w % 2 = 0;

INSERT INTO c
SELECT x, y + (x/3)%3-1
FROM a
WHERE x % 3 = 0;

INSERT INTO d
SELECT y, z
FROM a;

SELECT a.w, b.x, c.y
FROM a JOIN b ON (a.w = b.w OR a.x > b.x)
       JOIN c ON (a.x = c.x AND a.y > c.y)
       JOIN d ON (a.y = d.y OR a.z > d.z)
GROUP BY a.w, b.x, c.y
ORDER BY a.w, b.x, c.y;





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)