-- INNO-DB:
-- ========
drop table if exists EBI713_A;
create table if not exists EBI713_A (
    ID int,
    someName varchar(100)
);
insert into EBI713_A values
	(1, "Titus Hingst"),
	(2, "Heidi Schwerdtner")
;

drop view EBI713_view;
create view EBI713_view as 
select ID, someName
from EBI713_A
order by ID;

select count(ID) from EBI713_view;
-- correct: 2


-- COLUMNSTORE:
-- ============

drop table EBI713_A_CS;
create table EBI713_A_CS 
(
	ID int,
    someName varchar(100)
) ENGINE=Columnstore;

insert into EBI713_A_CS values
	(1, "Titus Hingst"),
	(2, "Heidi Schwerdtner")
;

drop view EBI713_view_CS;
create view EBI713_view_CS as 
select ID, someName
from EBI713_A_CS
order by ID; -- removing this line and the bug is gone, everything is correct
;

select count(ID) from EBI713_view_CS;
-- Error Code: 1815. Internal error: MCS-2021: 'ID' 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.015 sec
