[MCOL-1717] GROUP BY handler works in promiscuous mode Created: 2018-09-12  Updated: 2019-03-01  Resolved: 2019-03-01

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.0

Type: Bug Priority: Minor
Reporter: Roman Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-1052 Implement GROUP BY pushdown support Closed
Sprint: 2018-17, 2018-18, 2018-19, 2018-20, 2018-21, 2019-01, 2019-02

 Description   

GROUP BY handler processes every query not only that contains GROUP BY or aggregates in projection. Here is an output of the EXPLAIN for the simple SELECT that mustn't use GROUP BY handler for processing.

MariaDB [test]> explain extended select i from cs1;
+------+-------------+-------+------+---------------+------+---------+------+------+----------+---------------------------------+
| id   | select_type | table | type | possible_keys | key  | key_len | ref  | rows | filtered | Extra                           |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+---------------------------------+
|    1 | SIMPLE      | NULL  | NULL | NULL          | NULL | NULL    | NULL | NULL |     NULL | Storage engine handles GROUP BY |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+---------------------------------+
1 row in set, 1 warning (0.001 sec)

But it must look like this:

MariaDB [test]> explain extended select i from cs1;
+------+-------------+-------+------+---------------+------+---------+------+------+----------+-------+
| id   | select_type | table | type | possible_keys | key  | key_len | ref  | rows | filtered | Extra |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+-------+
|    1 | SIMPLE      | cs1   | ALL  | NULL          | NULL | NULL    | NULL | 2000 |   100.00 |       |
+------+-------------+-------+------+---------------+------+---------+------+------+----------+-------+
1 row in set, 1 warning (0.004 sec)



 Comments   
Comment by Roman [ 2018-09-12 ]

Please review.

Comment by Daniel Lee (Inactive) [ 2019-03-01 ]

Build verified:1.2.3-1 nightly

server commit:
61f32f2
engine commit:
e849af0

MariaDB [mytest]> explain extended select o_orderkey from orders;
------------------------------------------------------------------------

id select_type table type possible_keys key key_len ref rows filtered Extra

------------------------------------------------------------------------

1 SIMPLE orders ALL NULL NULL NULL NULL 2000 100.00  

------------------------------------------------------------------------
1 row in set, 1 warning (0.002 sec)

Generated at Thu Feb 08 02:30:51 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.