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
[Compatibility]: SUM and AVG reject ENUM and SET numeric aggregation supported by MySQL #28692
createtablet(
id intprimary key,
g int,
e enum('red','green','blue'),
s set('a','b','c')
);
insert into t values
(1,1,'red','a'),
(2,1,'red','a'),
(3,1,'green','a,b'),
(4,2,'blue','c'),
(5,2,null,null);
selectsum(e), avg(e), sum(s), avg(s) from t;
selectsum(distinct e), avg(distinct e),
sum(distinct s), avg(distinct s) from t;
select g, sum(e), avg(e), sum(s), avg(s)
from t group by g order by g;
MatrixOne 行为
上述查询在绑定阶段被拒绝:
ERROR 20203 (HY000): invalid argument aggregate function sum, bad value [VARCHAR]
ERROR 20203 (HY000): invalid argument aggregate function avg, bad value [VARCHAR]
Verified on current main 57c280e.\n\nENUM and SET numeric aggregation now follows the expected numeric values. For ENUM 1,2,4 and SET 1,2,1,4, the regression returns ENUM SUM/AVG 6/2.0000 and SET SUM/AVG 8/2.6667. The result passed three MOTR runs.\n\nCoverage: matrixorigin/motr#193,\nsuites/14_issue_regression/t/issue_28765_28694_28692_28222_compatibility.test.\n\nClosing as fixed.
Activity
fix(plan): preserve ENUM and SET identity for ordering and aggregates (…
Ariznawlll commentedon Sep 21, 2026
Verified on current main 57c280e.\n\nENUM and SET numeric aggregation now follows the expected numeric values. For ENUM 1,2,4 and SET 1,2,1,4, the regression returns ENUM SUM/AVG 6/2.0000 and SET SUM/AVG 8/2.6667. The result passed three MOTR runs.\n\nCoverage: matrixorigin/motr#193,\nsuites/14_issue_regression/t/issue_28765_28694_28692_28222_compatibility.test.\n\nClosing as fixed.