Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
10.2.15
-
None
Description
Given a query
select sum(i)+1 from cs1;
|
There are two elements in the extended SELECT that GROUP BY handler receives: Item_sum for sum(i) and Item_func_sum for sum(i)+1. Item_func_sum has Item_ref as its first argument. In the moment of the query execution this Item_ref references Item_temptable_field. Item_temptable_field corresponds with Item_sum in the SELECT list. This Item_temptable_field has a name attribute = "sum(i)" if the server code is built w/o DBUG_OFF. If DBUG_OFF is present there is no way to correlate this Item_temptable_field with Item_sum that is used by Columnstore semantic parser. Here is the place in sql_select.cc that populates the name attribute in a debug build. Columnstore symantic parser needs a way to correlate this two fields while parsing a query. My suggestion is to remove preprocessor condition if this is cheap in terms of processing overhead.
Attachments
Issue Links
- blocks
-
MCOL-1510 GROUP BY handler doesn't support operations on aggregate functions when projecting columns.
- Closed