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]: JSON_ARRAYAGG rejects YEAR values supported by MySQL #28061
MatrixOne rejects YEAR input to JSON_ARRAYAGG. MySQL 8 accepts the same column and emits numeric JSON elements. This prevents aggregation of a supported temporal SQL type into JSON.
Environment
Branch: main
Commit: 95d04586eb80864499d0fde27aeb912b463ae4cd
Deployment: local single-CN MatrixOne
Steps to reproduce
CREATETABLEt (id INTPRIMARY KEY, y YEAR);
INSERT INTO t VALUES (1, 2023), (2, 2024);
SELECT JSON_ARRAYAGG(y) FROM t;
Actual behavior
MatrixOne returns:
ERROR 20301 (HY000): invalid input: unsupported type for json aggregate: YEAR
Expected behavior
MySQL 8 returns a numeric JSON array:
[2023, 2024]
MatrixOne should accept YEAR values and preserve them as numeric JSON elements for MySQL compatibility.
Stability and controls
Reproducer: 3/3 on MatrixOne main.
MySQL 8 control: 3/3 returns [2023, 2024]; JSON_TYPE of the first element is UNSIGNED INTEGER.
Activity
fix(json): preserve arrayagg temporal and year values (#28094)
VioletQwQ-0 commentedon Sep 14, 2026
QA 验收请求
#28094 已合并,关联 issue #28061 保持 OPEN,现转 QA 验收。
7e10f471f8ff25f813d6c9fd7eecf9f6b1212cd2main:afbb411d5d880e1d0bf2a088ab14d81374254565test/distributed/cases/function/func_json_agg.test/.result;本机因缺少 Java runtime 未执行,记为NOT_RUN。请在上述 exact
main上完成:JSON_ARRAYAGG聚合 YEAR 值的成功路径及结果断言。预期 PASS:YEAR 值可被
JSON_ARRAYAGG正常聚合,结果与 MySQL 兼容预期一致,且无新增错误或告警。预期 FAIL:出现执行错误、结果与 MySQL 不一致,或 canonical BVT/目标拓扑验证不完整。
Ariznawlll commentedon Sep 15, 2026
测试版本
main:0c3a04f390adaf6281fd592a49778ea5b1155e67原问题验证
JSON_ARRAYAGG当前接受 YEAR,并生成数值 JSON 元素而非拒绝或字符串化错误。Happy Path 覆盖
覆盖多个 YEAR 值聚合和
JSON_TYPE元数据检查。Unhappy Path 覆盖
覆盖 NULL 与聚合边界,确认不会因 YEAR 类型触发类型转换错误。
白盒验证
不适用:公开 JSON 聚合 SQL 路径直接覆盖。
回归测试
已加入 MOTR:
issue_28061_json_arrayagg_year,见 motr#176。测试证据
新 MOTR 用例连续运行 3 轮成功,YEAR 聚合结果和 JSON 类型断言均正确。
测试结论
测试通过。
fix(json): preserve arrayagg temporal and year values (matrixorigin#2…
fix(json): preserve arrayagg temporal and year values (matrixorigin#2…
fix(json): preserve arrayagg temporal and year values (matrixorigin#2…