-- COLUMNSTORE:
create table A_CS (
someDatetime datetime,
someInt int
) ENGINE=Columnstore;

select distinct
DAYOFWEEK(someDatetime) as C1,
DAYOFWEEK(someDatetime) as C2,
SUM(someInt)
from A_CS
group by 
DAYOFWEEK(someDatetime),
DAYOFWEEK(someDatetime);
-- ==> Error Code: 1815. Internal error: IDB-2021: 'C2' is not in GROUP BY clause. All non-aggregate columns in the SELECT and ORDER BY clause must be included in the GROUP BY clause.	0.078 sec

select distinct
someDatetime as C1,
someDatetime as C2,
SUM(someInt)
from A_CS
group by 
someDatetime,
someDatetime;
-- ==> without function, it works


-- INNODB:
create table A_INNODB (
someDatetime datetime,
someInt int
) ENGINE=InnoDB;

select distinct
DAYOFWEEK(someDatetime) as C1,
DAYOFWEEK(someDatetime) as C2,
SUM(someInt)
from A_INNODB
group by 
DAYOFWEEK(someDatetime),
DAYOFWEEK(someDatetime);
-- works