-- Columnstore:
-- string:
create table null_avg_test_date_cs3 (
	some_string varchar(100)
) ENGINE=Columnstore;

insert into null_avg_test_date_cs3 values ("bla"), ("blabla"), ("blablabla"), (null);

SELECT DISTINCT
   AVG(length(some_string))
FROM null_avg_test_date_cs3;
-- 6, correct!!!

-- string:
create table null_avg_test_date_cs4 (
	some_string varchar(100)
) ENGINE=Columnstore;

insert into null_avg_test_date_cs4 values ("bla"), ("blabla"), ("blablabla"), ("x");

SELECT DISTINCT
   AVG(case when length(some_string)=1 then null else length(some_string) end)
FROM null_avg_test_date_cs4;
-- 6, correct!!!