You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: CTAS with aggregate functions infers schema differently from MySQL #24430
The CTAS result schema should be consistent with MySQL, including column type, nullability, default value, and expression alias casing.
Steps to Reproduce
drop table if exists agg01;
drop table if exists math01;
create table math01 (col1 int default 0, col2 decimal, col3 float, col4 double not null);
insert into math01 values (1, 7382.4324, 432453.3243, -2930.321323);
insert into math01 values (-100, 3283.32324, 328932.0, -9392032);
insert into math01 values (22813, -241, 932342.4324, -0.1);
insert into math01 values (null, null, null, 10);
create table agg01 as
select
avg(col1) as avgCol,
sum(col2) as sumcol,
count(col3) as countCol,
max(col4) as maxCol,
min(col4) as minCol
from math01;
show create table agg01;
desc agg01;
select * from agg01;
Activity
Ariznawlll commentedon May 18, 2026
Closing in favor of summary tracker #24436. This issue was split from #14792 during re-verification and is now tracked centrally in #24436.