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 bitwise aggregate functions infers schema differently from MySQL #24431
CREATETABLE `bit02` (
`bit_and(col2)`bigint unsigned NOT NULL DEFAULT '0',
`bit_or(col2)`bigint unsigned NOT NULL DEFAULT '0',
`bit_xor(col2)`bigint unsigned NOT NULL DEFAULT '0'
)
Expected Behavior
The CTAS result schema should be consistent with MySQL, especially nullability and default value of bitwise aggregate result columns.
Steps to Reproduce
drop table if exists bit02;
drop table if exists bit01;
create table bit01 (col1 char(1), col2 int);
insert into bit01 values ('a',111),('a',110),('a',100),('a',000),('b',001),('b',011);
create table bit02 as
select bit_and(col2), bit_or(col2), bit_xor(col2)
from bit01;
show create table bit02;
desc bit02;
select * from bit02;
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.